Router<T extends Routing> class
Main router object for Dia
Allows you to create separate middleware for specific urls and http methods
Middleware
in Router mast to be Context
with mixin Routing
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
middleware
→ Middleware<
T> -
Getter for
Middleware
that can use in DiaApp
no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
all(
String path, Middleware< T> middleware) → void -
Add
Middleware
to all HTTP request methodspath
- url path that handling by addedMiddleware
-
connect(
String path, Middleware< T> middleware) → void -
Add
Middleware
to CONNECT HTTP request methodspath
- url path that handling by addedMiddleware
-
del(
String path, Middleware< T> middleware) → void -
Add
Middleware
to DELETE HTTP request methods this is symlink to delete methodpath
- url path that handling by addedMiddleware
-
delete(
String path, Middleware< T> middleware) → void -
Add
Middleware
to DELETE HTTP request methodspath
- url path that handling by addedMiddleware
-
get(
String path, Middleware< T> middleware) → void -
Add
Middleware
to GET HTTP request methodspath
- url path that handling by addedMiddleware
-
head(
String path, Middleware< T> middleware) → void -
Add
Middleware
to HEAD HTTP request methodspath
- url path that handling by addedMiddleware
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
options(
String path, Middleware< T> middleware) → void -
Add
Middleware
to OPTIONS HTTP request methodspath
- url path that handling by addedMiddleware
-
patch(
String path, Middleware< T> middleware) → void -
Add
Middleware
to PATCH HTTP request methodspath
- url path that handling by addedMiddleware
-
post(
String path, Middleware< T> middleware) → void -
Add
Middleware
to POST HTTP request methodspath
- url path that handling by addedMiddleware
-
put(
String path, Middleware< T> middleware) → void -
Add
Middleware
to PUT HTTP request methodspath
- url path that handling by addedMiddleware
-
toString(
) → String -
A string representation of this object.
inherited
-
trace(
String path, Middleware< T> middleware) → void -
Add
Middleware
to TRACE HTTP request methodspath
- url path that handling by addedMiddleware
-
use(
Middleware< T> middleware) → void -
Add
Middleware
to Router allMiddleware
called before RouterMiddleware
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited