simple_http_router library
Classes
- Context
- Context for the current route pipeline. The Context gets passed from middleware to middleware. Anything that gets passed to values will be visibel to the other middleware. Calling cancel prevents any further middlewere from executing.
- HttpMethodHandler
- Handles all the Http method specific Handlers and executes the right one.
- MiddlewareHandler
-
Executes middleware before and after
_handlerFunc
. All middleware gets executed sequentially. - MiddlewareHandlerBuilder
- It could get tedious creating multiple MiddlewareHandlers with the same middleware. MiddlewareHandlerBuilder makes it simpler.
- Route
- Router
-
Matches incoming
HttpRequests
against registeredRoutes
. [...]
Typedefs
-
Handler(
HttpRequest, [Context]) → FutureOr< void> - A Handler can handle HttpRequest specific operations or act as middleware.
-
MethodNotAllowedHandler(
HttpRequest, List< String> allowedMethods, [Context]) → FutureOr<void>