Router class

Constructors

Router()

Properties

bindings List<RouteBinding>
getter/setter pair
container Container?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
middleware List<MiddlewareFunc>
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
server HttpServer?
getter/setter pair

Methods

connect(String path, {RequestCallback? handler, Controller? controller, String? method, List<MiddlewareFunc> middleware = const []}) → void
delete(String path, {RequestCallback? handler, Controller? controller, String? method, List<MiddlewareFunc> middleware = const []}) → void
get(String path, {RequestCallback? handler, Controller? controller, String? method, List<MiddlewareFunc> middleware = const []}) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options(String path, {RequestCallback? handler, Controller? controller, String? method, List<MiddlewareFunc> middleware = const []}) → void
patch(String path, {RequestCallback? handler, Controller? controller, String? method, List<MiddlewareFunc> middleware = const []}) → void
post(String path, {RequestCallback? handler, Controller? controller, String? method, List<MiddlewareFunc> middleware = const []}) → void
put(String path, {RequestCallback? handler, Controller? controller, String? method, List<MiddlewareFunc> middleware = const []}) → void
serveHTTP() Future
setDIContainer(Container container) → 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, Controller? controller, String? method, List<MiddlewareFunc> middleware = const []}) → void

Operators

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