Oxpecker is a functional wrapper around ASP.NET Core Endpoint routing (sometimes called Minimal API).
This library is basically a revised version of Giraffe, it mostly sticks to it's successful API (hence the name). Improvements involve changing some core types, performance of template handlers, simplifying handlers and dropping a lot of outdated functionality.
Medium introductory post: https://medium.com/@lanayx/the-oxpecker-ef9df3dfb918
- Native ASP.NET Core Endpoint routing integration
- Strongly typed route parameters
- Endpoint handlers and endpoint middlewares, flexible composition
- JSON binding and serialization
- Form binding
- URL parameters binding
- Response caching
- Streaming
- Authorization
- eTag support
- Many useful HttpContext extensions
TBD, for now you can use Giraffe documentation, with the following differences:
routef
parameters should be surrounded with curly braces{}
, this allows using Route constraintsroutef
handler arguments are now curried, not tuplifiedHttpHandler
concept is separated intoEndpointHandler
andEndpointMiddlware
. The difference is that the former doesn't acceptnext
parameter, while the latter does.- Case insensitive functions (
*Ci
) are dropped, since everything is case insensitive by default - Some other route functions are dropped
JSON.ISerializer
only requires one method implemented- Model binding will throw exceptions to be caught in common middleware (see examples/Basic)
- .NET 8 minimal target
- Oxpecker project is planned to be moved to
fsprojects
organization once it reaches 200 stars, expect high quality of maintenance