RequestHandler typedef
RequestHandler =
FutureOr<Response> Function(ServerContext serverContext, Request req, Response res)
RequestHandler is a typedef
that is used to define a callback for a request.
req
is a Request that is the request.
res
is a Response that is the response.
returns FutureOr of void
.
Implementation
typedef RequestHandler = FutureOr<Response> Function(
ServerContext serverContext, Request req, Response res);