Router class
Constructors
-
Router({dynamic address})
-
Methods
-
connect(String path, RequestCallback handler, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
delete(String path, RequestCallback handler, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
get(String path, RequestCallback handler, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
head(String path, RequestCallback handler, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
options(String path, RequestCallback handler, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
patch(String path, RequestCallback handler, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
post(String path, RequestCallback handler, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
processHandlersWithMiddleware(Future<Response> initialHandler(Context context), List<Function> allMiddlewares, Context context, HttpRequest request)
→ Future<void>
-
-
put(String path, RequestCallback handler, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
serveHTTP()
→ Future
-
-
setDIContainer(StewardContainer container)
→ void
-
-
staticFiles(String path, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
terminate()
→ Future
-
forcibly shut down the server
userful if the server is running in the background
-
toString()
→ String
-
A string representation of this object.
inherited
-
trace(String path, RequestCallback handler, {List<MiddlewareFunc> middleware = const []})
→ void
-
-
writeErrorResponse(dynamic request, dynamic err, dynamic stacktrace)
→ Future<void>
-