RequestOnlyRouterHandler class final
A concrete RouterHandler for routes that operate only on ServerHttpRequest.
The RequestOnlyRouterHandler adapter wraps a RequestRouterFunction and ensures it can be invoked uniformly by the dispatcher pipeline.
Example
final route = RequestOnlyRouterHandler((req) => {'hello': 'world'});
final result = await route.invoke(request, response);
// result → {'hello': 'world'}
- Implemented types
Constructors
- RequestOnlyRouterHandler(RequestRouterFunction _function)
-
A concrete RouterHandler for routes that operate only on
ServerHttpRequest.
const
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
-
invoke(
ServerHttpRequest request, ServerHttpResponse response) → FutureOr< Object?> -
Invokes the underlying route handler function.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited