Inspiration for the Expresso library came from the Express routing code. It greatly simplifies creating a RESTful web-service in C#. A simple example of using Expresso that maps the /users endpoint of a url to a callback is
var router = new Router();
router.Route(HttpMethods.Get, "/users", (req, res) =>
{
});
The HttpRouter also provides a way to get parameters from an endpoint. An example that maps the /users/georgebearden endpoint of a url to callback is
var router = new Router();
router.Route(HttpMethods.Get, "/users/{userId}", (req, res) =>
{
var userId = req.Params["userId"];
});
- Windows Desktop .NET 4.5
- Xamarin support coming soon...
Adding support for middleware.