spry library

Classes

Blob
Binary large object.
ErrorRoute
Binds an error handler to a route path and optional method.
Event
Request-scoped context passed to routes, middleware, and error handlers.
File
File metadata wrapper over Blob.
FormData
Form-data collection compatible with fetch-style APIs.
Headers
A mutable, case-insensitive HTTP headers collection.
MiddlewareRoute
Binds middleware to a route path and optional method.
Request
Fetch-like HTTP request model.
RequestContext
Adds per-request controls on top of the shared lifecycle context.
Response
Fetch-like HTTP response model.
RuntimeCapabilities
Describes which runtime-backed features are available to a server instance.
RuntimeInfo
Identifies a runtime family and the role it is performing.
ServerLifecycleContext
Carries runtime metadata shared by lifecycle hooks and request handling.
Spry
A Spry application with routes, middleware, and error handlers.
URLSearchParams
Query parameter collection compatible with the MDN URLSearchParams model.

Enums

HttpMethod
Standard HTTP methods used by both client and server side APIs.

Extension Types

Locals
Mutable request-local storage keyed by symbols.
RouteParams
Route parameters exposed as typed helpers.

Typedefs

ErrorHandler = FutureOr<Response> Function(Object error, StackTrace stackTrace, Event event)
Handles an error raised while processing a request.
Handler = FutureOr<Response> Function(Event event)
Handles a matched route request.
Middleware = FutureOr<Response> Function(Event event, Next next)
Intercepts a request before the final route handler runs.
Next = Future<Response> Function()
Continues execution to the next middleware or route handler.
RouteHandlers = Map<HttpMethod?, Handler>
Route handlers keyed by HTTP method.

Exceptions / Errors

HTTPError
Base HTTP exception used to convert failures into responses.
NotFoundError
Error thrown when no route or fallback matches a request.