spry library

Classes

Event
Request event interface.
HttpMessage
HTTP message universal interface.
Request
HTTP request.
Response
HTTP Response.
Routes
Spry Routes
Spry
Spry application.

Extension Types

Headers
HTTP headers

Extensions

HttpStatusReasonPhrase on int
HTTP status code reason phrases.
RoutesAll on Routes
The all method extension.
RoutesGroup on Routes
RoutesMethods on Routes
The <method> extension.

Functions

createError(String message) SpryError
Creates a new SpryError.
createEvent(Spry app, Request request) Event
Creates a new Spry Event instance.
createSpry({RouterContext<Handler>? router, Iterable<Handler>? stack}) Spry
Creates a new Spry application.
getClientAddress(Event event) String?
Gets current request event client address.
next(Event event) Future<Response>
Call next handler in Spry.stack.
setClientAddress(Event event, String address) → void
Sets a client address in request Event.
toHandler(Spry app) Handler<Response>
Creates a new Spry Handler using a Spry application.
useHeaders(Event event) Headers
Reads current request event Headers.
useParam(Event event, String key) String?
Returns selected request matched route param.
useParams(Event event) Map<String, String>
Returns the request Event matched route params.
useRequest(Event event) Request
Reads current Request.
useRequestURI(Event event) Uri
Returns the Uri for current request Event.

Typedefs

Handler<T> = FutureOr<T> Function(Event event)
Spry handler.

Exceptions / Errors

SpryError
Spry error.