Router class
Routes a request to the first route whose method and pattern match it.
Each registration takes maxBodyBytes, the largest body that route reads
when it needs more (or less) than the server's own limit. The native side
reads a body before any Dart runs, so it has to be told: serve() takes
bodyLimits as routeBodyLimits.
Constructors
- Router()
Properties
-
bodyLimits
→ List<
DVRouteBodyLimit> -
Every route, in the order requests are dispatched to them, with the
limit it declared or null for the server's.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
any(
String pattern, Handler h, {int? maxBodyBytes}) → Router -
call(
Request req) → Future< Response> -
delete(
String pattern, Handler h, {int? maxBodyBytes}) → Router -
get(
String pattern, Handler h, {int? maxBodyBytes}) → Router -
head(
String pattern, Handler h, {int? maxBodyBytes}) → Router -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
post(
String pattern, Handler h, {int? maxBodyBytes}) → Router -
put(
String pattern, Handler h, {int? maxBodyBytes}) → Router -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited