app library

Classes

Blob
Binary large object.
ErrorRoute
Binds an error handler to a route path and optional method.
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.
Response
Fetch-like HTTP response model.
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.

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.