route method
NestedRoute
route(
- String path, {
- List<
FutureOr Function(HyperioAzkadevHttpRequest req, HyperioAzkadevHttpResponse res)> middleware = const [],
Creates one or multiple route segments that can be used as a common base for specifying routes with get, post, etc.
You can define middleware that effects all sub-routes.
Implementation
NestedRoute route(String path,
{List<
FutureOr Function(HyperioAzkadevHttpRequest req,
HyperioAzkadevHttpResponse res)>
middleware = const []}) =>
NestedRoute(
hyperio: _hyperio,
basePath: _composePath(_basePath, path),
baseMiddleware: [..._baseMiddleware, ...middleware]);