http/http_controller_handler library
Classes
- ControllerArg
- One parameter of a controller.
- ControllerPlan
- How to call one controller: what goes in each parameter.
- ControllerTypes
-
Reads the parameter types of a function from its runtime type,
like
(DoxRequest, int) => Future<User>. - RouteParamBinder
- One route param that a binder turns into a value before the controller runs.
Enums
Functions
-
asResponse(
dynamic value) → DoxResponse -
valueas a DoxResponse. An http exception becomes its JSON body with its status, so a middleware can still change the status. -
middlewareAndControllerHandler(
DoxRequest doxReq) → Future - Handle middleware and controllers
-
runMiddlewareAndController(
DoxRequest doxReq) → FutureOr - Run middleware and controllers. It stays sync while every step gives a plain value, so a simple route needs no Future. At the first Future it waits, then goes on with the next item.