API Reference roadrunner v#0.11.0

View Source

Modules

Public API for the roadrunner HTTP server.

Response compression middleware. Compresses response bodies with gzip or deflate (RFC 9110 §8.4.1), chosen from the request's Accept-Encoding.

HTTP cookie codec (RFC 6265).

Cross-Origin Resource Sharing (CORS) middleware.

Conditional request middleware for dynamic responses (RFC 9110 §13.1.2).

Behaviour for an event handler: the module roadrunner hands its request, connection, and WebSocket events to.

The default roadrunner_event_handler: drops every event.

Behaviour for handling parsed HTTP requests.

Protocol-version-agnostic HTTP semantics shared by HTTP/1.1 (roadrunner_http1) and HTTP/2 (roadrunner_http2_*) modules.

Listener gen_server — owns the listening socket and the acceptor pool for one named roadrunner instance.

Continuation-style middleware for roadrunner handlers.

Parser for multipart/form-data request bodies (RFC 7578).

Newline-delimited JSON (NDJSON) encoding helper.

application/x-www-form-urlencoded query string codec.

Pure accessors over the request() map.

Convenience builders for the buffered {Status, Headers, Body} triple — one of the five shapes a roadrunner handler can return.

Path → handler dispatch with parameterized segments.

Security-headers middleware: a default-safe set of response headers, the same handful every browser-facing service hand-rolls, added to every HTTP response and leaving any header the handler already set untouched.

Server-Sent Events (SSE) encoding helpers.

Built-in static file handler.

URI percent-encoding helpers (RFC 3986 §2.1).

WebSocket protocol primitives (RFC 6455 + RFC 7692).

Behaviour for WebSocket handlers.