Router class abstract
Spry Router interface.
- Available extensions
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
-
all(
String path, Handler handler) → void -
Available on Router, provided by the HttpVerbRouterExtension extension
Define aallroute. -
call(
Context context) → FutureOr< void> - Cast the router to a spry Handler.
-
connect(
String path, Handler handler) → void -
Available on Router, provided by the HttpVerbRouterExtension extension
Define aconnectroute. -
contains(
String verb, String path) → bool - Has a route been defined for the given HTTP verb and path segment?
-
delete(
String path, Handler handler) → void -
Available on Router, provided by the HttpVerbRouterExtension extension
Define adeleteroute. -
get(
String path, Handler handler) → void -
Available on Router, provided by the HttpVerbRouterExtension extension
Define agetroute. -
handle(
String verb, String path, Context context) → FutureOr< void> - Handle a HTTP verb request to a path.
-
head(
String path, Handler handler) → void -
Available on Router, provided by the HttpVerbRouterExtension extension
Define aheadroute. -
merge(
Router router) → void - Merge the given Router into this Router.
-
mount(
String prefix, {Router? router, Handler? handler}) → void -
Mount a Handler or Router to the given
prefix. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
options(
String path, Handler handler) → void -
Available on Router, provided by the HttpVerbRouterExtension extension
Define aoptionsroute. -
param(
String name, ParamMiddleware middleware) → void - Adds a ParamMiddleware to route parameters.
-
post(
String path, Handler handler) → void -
Available on Router, provided by the HttpVerbRouterExtension extension
Define apostroute. -
put(
String path, Handler handler) → void -
Available on Router, provided by the HttpVerbRouterExtension extension
Define aputroute. -
route(
String verb, String path, Handler handler) → void - Define a route for the given HTTP verb and path segment.
-
toString(
) → String -
A string representation of this object.
inherited
-
trace(
String path, Handler handler) → void -
Available on Router, provided by the HttpVerbRouterExtension extension
Define atraceroute. -
use(
Middleware middleware) → void - Add a Middleware to the router.
Operators
-
operator &(
Router router) → Router -
Available on Router, provided by the RouterOperator extension
Merge the given Router into this Router. -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator |(
Middleware middleware) → Router -
Available on Router, provided by the RouterOperator extension
Register a Middleware to the router.