ChaseBuilderOn class

A builder for configuring routes that match specific HTTP methods.

Similar to ChaseBuilder but registers the handler for multiple methods.

Example

app.on(['GET', 'POST'], '/form')
  .use(CsrfMiddleware())
  .handle(formHandler);

See also

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

handle(Handler handler) → void
Registers the handler for the specified HTTP methods on this route.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
use(Middleware middleware) ChaseBuilderOn
Adds a middleware to this route.
inherited
useAll(List<Middleware> middlewares) ChaseBuilderOn
Adds multiple middlewares to this route.
inherited

Operators

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