Route constructor
Route(
- String path,
- RouteHandler handler, {
- List<
String> methods = const <String>['*'], - Map<
String, String> ? pathRegEx, - int? statusCode,
- String? mimeType,
- String? charset = kDefaultCharset,
- ResponseProcessor? responseProcessor,
- List<
RouteInterceptor> ? after, - List<
RouteInterceptor> ? before, - List<
ExceptionHandler> ? onException,
Constructs a Route
Implementation
factory Route(String path, RouteHandler handler,
{List<String> methods = const <String>['*'],
Map<String, String>? pathRegEx,
int? statusCode,
String? mimeType,
String? charset = kDefaultCharset,
ResponseProcessor? responseProcessor,
List<RouteInterceptor>? after,
List<RouteInterceptor>? before,
List<ExceptionHandler>? onException}) =>
Route.fromInfo(
HttpMethod(
path: path,
methods: methods,
pathRegEx: pathRegEx,
statusCode: statusCode,
mimeType: mimeType,
charset: charset,
responseProcessor: responseProcessor),
handler,
before: before,
after: after,
onException: onException);