RequestHandler typedef

Future<Response> RequestHandler (Request req)

HTTP request handler function type.

Methods of this type are used as the handler that is invoked when a rule's pattern matches the request.

If the future returns a response, processing stops and that response is used to produce the HTTP response. If the future returns null, the search continues for another matching rule.

Used for in the rules of a ServerPipeline.