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

Router(String prefix)
Default constructor perfix - url path that controlled by this Router

Properties

hashCode int
The hash code for this object.
no setterinherited
middleware → Middleware<T>
Getter for Middleware that can use in Dia App
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 methods path - url path that handling by added Middleware
connect(String path, Middleware<T> middleware) → void
Add Middleware to CONNECT HTTP request methods path - url path that handling by added Middleware
del(String path, Middleware<T> middleware) → void
Add Middleware to DELETE HTTP request methods this is symlink to delete method path - url path that handling by added Middleware
delete(String path, Middleware<T> middleware) → void
Add Middleware to DELETE HTTP request methods path - url path that handling by added Middleware
get(String path, Middleware<T> middleware) → void
Add Middleware to GET HTTP request methods path - url path that handling by added Middleware
Add Middleware to HEAD HTTP request methods path - url path that handling by added Middleware
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 methods path - url path that handling by added Middleware
patch(String path, Middleware<T> middleware) → void
Add Middleware to PATCH HTTP request methods path - url path that handling by added Middleware
post(String path, Middleware<T> middleware) → void
Add Middleware to POST HTTP request methods path - url path that handling by added Middleware
put(String path, Middleware<T> middleware) → void
Add Middleware to PUT HTTP request methods path - url path that handling by added Middleware
toString() String
A string representation of this object.
inherited
trace(String path, Middleware<T> middleware) → void
Add Middleware to TRACE HTTP request methods path - url path that handling by added Middleware
use(Middleware<T> middleware) → void
Add Middleware to Router all Middleware called before RouterMiddleware

Operators

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