Muxable class abstract

Implementers

Constructors

Muxable()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(Iterable<Route> routes) → void
addRoute(Route route) Route
Adds a route to the muxer
delete(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with DELETE method to be served
deleteJson(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor = jsonResponseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with DELETE method to be served
get(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with GET method to be served
getJson(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor = jsonResponseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with GET method to be served
html(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType = MimeTypes.html, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with GET method to be served
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}) Route
Adds a route to be served
map(Map<String, dynamic> handlers, {List<RouteInterceptor> before = const [], List<RouteInterceptor> after = const [], List<ExceptionHandler> onException = const []}) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with OPTIONS method to be served
patch(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with PATCH method to be served
post(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with POST method to be served
postJson(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor = jsonResponseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with POST method to be served
put(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with PUT method to be served
putJson(String path, RouteHandler handler, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor = jsonResponseProcessor, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route with PUT method to be served
route(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, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Adds a route to be served
staticFile(String path, dynamic file, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, Iterable<String? Function(File)>? mimeTypeDetectors}) Route
Serves requests at path with content of file
staticFiles(String path, dynamic directory, {Map<String, String>? pathRegEx, int statusCode = 200, String? mimeType, String? charset = kDefaultCharset, ResponseProcessor? responseProcessor, bool stripPrefix = true, Future<Response> directoryLister(Directory directory)?, Iterable<String? Function(File)>? mimeTypeDetectors}) Route
Serves requests for static files at path from directory
toString() String
A string representation of this object.
inherited
wsEcho(String path, {Map<String, String>? pathRegEx, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Example: server.wsEcho('/ws');
wsResponder(String path, WsOnConnect onConnect, {Map<String, String>? pathRegEx, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Example: server.wsEcho('/ws');
wsStream(String path, WsOnConnect onConnect, {Map<String, String>? pathRegEx, List<RouteInterceptor>? after, List<RouteInterceptor>? before, List<ExceptionHandler>? onException}) Route
Example: server.wsStream('/ws', (ctx, ws) => Stream.periodic);

Operators

operator ==(Object other) bool
The equality operator.
inherited