shelf library

Classes

Cascade
A helper that calls several handlers in sequence and returns the first acceptable response. [...]
Pipeline
A helper that makes it easy to compose a set of Middleware and a Handler. [...]
Request
Represents an HTTP request to be processed by a Shelf application.
Response
The response returned by a Handler.
Server
An adapter with a concrete URL. [...]
ServerHandler
A connected pair of a Server and a Handler. [...]

Properties

addChunkedEncoding Middleware
Middleware that adds chunked transfer coding to responses if none of the following conditions are true: [...]
final

Functions

createMiddleware({FutureOr<Response> requestHandler(Request request), FutureOr<Response> responseHandler(Response response), FutureOr<Response> errorHandler(dynamic error, StackTrace stackTrace) }) Middleware
Creates a Middleware using the provided functions. [...]
logRequests({void logger(String msg, bool isError) }) Middleware
Middleware which prints the time of the request, the elapsed time for the inner handlers, the response's status code and the request URI. [...]

Typedefs

Handler(Request request) → FutureOr<Response>
A function which handles a Request. [...]
Middleware(Handler innerHandler) Handler
A function which creates a new Handler by wrapping a Handler. [...]

Exceptions / Errors

HijackException
An exception used to indicate that a request has been hijacked. [...]