Menu

Reference

Http

Classes

ChunkedWriterThe writer a streaming response body receives; see Response::stream().
HeadersA set of HTTP header fields: case-insensitive lookup on top of the ordered wire lines.
PartOne part of a streamed multipart/form-data body, read straight off the connection.
ProxyBit flags that say which forwarded headers a trusted proxy may set.
RequestOne parsed HTTP request, as the handler receives it.
ResponseA response under construction: the value a handler returns.
ServerAn HTTP/1.1 server: (new Server($addr))->serve($handler), where the handler is callable(Request): Response.
StatusHTTP status codes as integer constants, plus helpers for the response path.
UploadedFileOne file received in a multipart/form-data upload: php's $_FILES row as an object.

Enums

MethodThe nine HTTP methods defined by RFC 9110, as a typed view of the request method token.

Functions

inCidr()Whether an IP address lies inside a CIDR network.
mimeFor()The Content-Type for a file name, chosen by its extension (case-insensitive).
reason()The reason phrase for a status code, or '' for a code that has no phrase here.
request()The request being served on the current flow, or null outside one.
safePath()Maps a request path to a regular file under a document root, or returns null.