Http
Table of Contents
Interfaces
- HandlerInterface
- HTTP client handler interface
- MiddlewareInterface
- Client middleware interface - a PSR-15-style interceptor for Client's outbound
dispatch. Not a literal PSR-15 implementation: PSR-15's real interfaces are typed
to ServerRequestInterface (server-side only) and cannot apply to a Client's
outbound RequestInterface flow, so this mirrors PSR-15's shape with the request
type swapped.
- RequestHandlerInterface
- Client middleware request handler interface - what a MiddlewareInterface's
$handler argument is; calling $handler->handle($request) continues the chain
- HttpInterface
- HTTP interface
- PromiseInterface
- HTTP promise interface
- RequestResponseInterface
- HTTP request/response interface
Classes
- AbstractHttp
- Abstract HTTP class
- AbstractRequest
- Abstract HTTP request class
- AbstractRequestResponse
- Abstract HTTP request/response class
- AbstractResponse
- Abstract HTTP response class
- Digest
- HTTP auth digest class
- Exception
- HTTP auth exception class
- Auth
- HTTP auth header class
- Exception
- HTTP body exception class
- Multipart
- HTTP multipart/form-data builder and parser (RFC 7578)
- Body
- HTTP body class
- Data
- Client request data class
- Exception
- HTTP client exception class
- AbstractCurl
- HTTP client abstract curl class
- AbstractHandler
- HTTP client handler interface
- Command
- HTTP client curl command class
- Exception
- HTTP client handler exception class
- Options
- HTTP client curl options class
- Curl
- HTTP client curl handler class
- CurlMulti
- HTTP client curl multi handler class
- Exception
- HTTP client handler exception class
- Mock
- HTTP client mock handler class
- Stream
- HTTP client stream handler class
- CallableMiddleware
- Adapts a plain callable into a MiddlewareInterface, so Client::addMiddleware()
can accept a closure directly instead of requiring a full class
- CallableRequestHandler
- Adapts a plain callable into a RequestHandlerInterface. Internal - used by
Pipeline to build each link of the chain; not part of the API a middleware
author interacts with directly.
- LoggingMiddleware
- PSR-3 logging middleware - logs one line per handler invocation (per
dispatch attempt), with a level derived from the outcome (info for
success, warning for 4xx, error for 5xx or a thrown exception), known-
sensitive headers redacted by default, and request/response bodies
excluded unless explicitly opted in. Exceptions are logged then
re-thrown completely unmodified. No special coupling with
RetryMiddleware - see logRetriesTo() for an optional adapter onto its
existing onRetry hook.
- Pipeline
- Builds and runs a middleware chain. Registration order is wrap order: the
first-registered middleware ends up outermost (runs first going in, last
coming out) - the standard onion convention.
- RetryMiddleware
- Retry/backoff middleware - retries a request on transient network exceptions
and/or specific response status codes, with exponential backoff and full
jitter between attempts. Honors a Retry-After response header over the
computed delay when present. Skips retrying entirely when the request has
a non-seekable body, since a partially-consumed stream can't be safely
resent.
- Request
- HTTP client request class
- RequestException
- HTTP client request exception class - thrown by Client::sendRequest() for
pre-dispatch validation failures (e.g. no request URI to send)
- Response
- HTTP client response class
- Client
- HTTP client class
- Exception
- HTTP exception class
- RequestFactory
- PSR-17 request factory class
- ResponseFactory
- PSR-17 response factory class
- ServerRequestFactory
- PSR-17 server request factory class
- StreamFactory
- PSR-17 stream factory class
- UploadedFileFactory
- PSR-17 uploaded file factory class
- UriFactory
- PSR-17 URI factory class
- Parser
- HTTP response parser class
- AbstractPromise
- Abstract HTTP promise class
- Exception
- HTTP promise exception class
- Promise
- HTTP promise class
- AcceptHeader
- HTTP accept header class
- Data
- HTTP server request data class
- Exception
- HTTP server exception class
- QualityValue
- HTTP quality value class
- Request
- HTTP server request class
- Response
- HTTP server response class
- Upload
- HTTP server upload class
- UploadedFile
- HTTP server uploaded file class
- Server
- HTTP server class
- Uri
- HTTP URI class
Traits
- HttpFilterableTrait
- HTTP filterable trait
Enums
- AcceptSpecificity
- HTTP accept specificity enum