json method
Adds a route to be served
Implementation
Route json(String path, RouteHandler handler,
{Map<String, String> pathRegEx,
List<String> methods: const <String>['GET', 'PUT', 'POST', 'DELETE'],
int statusCode: 200,
String mimeType,
String charset: kDefaultCharset,
ResponseProcessor responseProcessor: jsonResponseProcessor,
List<RouteInterceptor> after,
List<RouteInterceptor> before,
List<ExceptionHandler> onException}) {
final route = Route.json(path, handler,
pathRegEx: pathRegEx,
methods: methods,
statusCode: statusCode,
mimeType: mimeType,
charset: charset,
responseProcessor: responseProcessor,
before: before,
after: after,
onException: onException);
return addRoute(route);
}