Handler class
Used by Shorebird codegen to register handlers for endpoints.
Constructors
- Handler({required String path, required Handler onRequest, String method = 'POST'})
-
Handler.simpleCall(String path, Future<
Response> onRequest(RequestContext context, Map<String, dynamic> body)) -
Creates a handler that can be used to handle a request to a
Future<T> Endpoint.
factory
-
Handler.stream(String path, Stream<
Map< createJsonStream(RequestContext context, Map<String, dynamic> >String, dynamic> body)) -
Creates a handler that can be used to handle a request to a
Stream<T> Endpoint
factory
Properties
Methods
-
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