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

ArgKind
What Dox gives to one parameter of a controller.
PathType
The type of a path param parameter.

Functions

asResponse(dynamic value) → DoxResponse
value as 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.