discontinuedPackage shorebird has been discontinued.

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<String, dynamic>> createJsonStream(RequestContext context, Map<String, dynamic> body))
Creates a handler that can be used to handle a request to a Stream<T> Endpoint
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
method → String
final
onRequest → Handler
final
path → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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