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
- 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.
Extensions
- MiddlewareExtensions on Middleware
- Extensions on Middleware to aid in composing Middleware and Handlers.
Properties
- addChunkedEncoding → Middleware
-
Middleware that adds
chunked transfer coding
to a responses if none of the following conditions are true:
final
Functions
-
createMiddleware(
{FutureOr< Response?> requestHandler(Request)?, FutureOr<Response> responseHandler(Response)?, FutureOr<Response> errorHandler(Object error, StackTrace)?}) → Middleware - Creates a Middleware using the provided functions.
-
logRequests(
{void logger(String message, 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
Exceptions / Errors
- HijackException
- An exception used to indicate that a request has been hijacked.