Calebs.WebAPI 0.1.0-ci-1

This is a prerelease version of Calebs.WebAPI.
dotnet tool install --global Calebs.WebAPI --version 0.1.0-ci-1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local Calebs.WebAPI --version 0.1.0-ci-1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Calebs.WebAPI&version=0.1.0-ci-1&prerelease
nuke :add-package Calebs.WebAPI --version 0.1.0-ci-1

Caleb's WebAPI

a basic Web API useful for testing multiple scenarios - deployed as a console app and dotnet tool.

Install

dotnet tool install --global Calebs.WebAPI

Usage

To start web API app:

calebs.webapi

Optionaly specifiy port to run on:

calebs.webapi --urls=http://localhost:PORT

Supported Commands:

  • GET /hello/ This is a hello world end point. Should return hello world

  • GET /hello/{name}/ Hello world, with a passed token. Should return hello {name}

  • GET /secure/ a secure end point. Will return 403 Not Authorized if no bearer token is present as a header.

  • GET /AuthToken/ will return a token that can be used for the /secure/ end point

  • Echo This is why you're here. Echo returns back everything from the request. Including VERB used (GET, POST, DELETE, PUT, PATCH) are currently supported. All querystring, headers, cookies and body information are all reflected back as a JSON object.

Coming Soon

  • A set of RESTFUL end-points for User objects - backed by an IKeyValueRepo for some minimal stateful scenarios.
  • Considering: a set of "admin" end-points to allow dynamically adding new endpoints and supported RESTFUL nouns.

Contribution

Please submit all PRs to the develop branch

Version History

  • 0.1.0 - intial version. .NET 7 Installs as a dotnet global tool or run locally as a console web app.
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
0.1.0-ci-1 83 1/22/2024