Route class

Represents a single route on an API.

Constructors

Route(Api api, dynamic match, {dynamic security, ApiClient? apiClient, List<HttpHandler> middlewares = const []})

Properties

api Api
The api that this route belongs to.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
match String
The path that this route will match on.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
security List<OidcOptions>
The security to apply to the route.
getter/setter pair

Methods

all(HttpHandler handler) Future<void>
A request handler for this route that matches all HTTP methods.
delete(HttpHandler handler) Future<void>
A DELETE request handler for this route.
get(HttpHandler handler) Future<void>
A GET request handler for this route.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
options(HttpHandler handler) Future<void>
An OPTIONS request handler for this route.
patch(HttpHandler handler) Future<void>
A PATCH request handler for this route.
post(HttpHandler handler) Future<void>
A POST request handler for this route.
put(HttpHandler handler) Future<void>
A PUT request handler for this route.
toString() String
A string representation of this object.
inherited

Operators

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