http/http_route_handler library
Functions
-
httpPathHasRoute(
HttpRequest req) → bool -
true when a route of any method matches the path of
req. withMethodOverride, a POST to a path with no route at all is answered without reading its body. -
httpRouteHandler(
HttpRequest req, {String? method, RequestBody? body}) → RouteMatch? -
methodis the method to match, when it is not the request method (a_methodform field, seeMethodOverride).
Typedefs
-
RouteMatch
= ({Map<
String, dynamic> ? params, RouteData route}) - the route for a request, and its params (null for a route with none). the params are not put on the shared RouteData, so no copy of it is made per request.