Download the PHP package thingston/psr18 without Composer
On this page you can find all versions of the php package thingston/psr18. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download thingston/psr18
More information about thingston/psr18
Files in thingston/psr18
Package psr18
Short Description Implementation of PSR-18 standard for sending HTTP requests and receiving HTTP responses.
License MIT
Informations about the package psr18
thingston/psr18
Implementation of PSR-18 standard for sending HTTP requests and receiving HTTP responses.
Requirements
- PHP 8.5 or newer
- PHP cURL extension
Installation
Usage
The client uses the PHP cURL extension and accepts native cURL options for request and response handling. Internally, request and response options are modeled separately so defaults, validation, and client-managed options stay explicit. Options that are required to build PSR-18 compliant requests and responses, such as CURLOPT_URL, CURLOPT_HTTPHEADER, CURLOPT_WRITEFUNCTION, and CURLOPT_HEADERFUNCTION, are reserved and cannot be overridden.
Configuration
Common request options are exposed as public constants for readability:
Response handling options can be configured separately:
Retry support is opt-in and retries only idempotent methods by default (GET, HEAD, OPTIONS, PUT, DELETE, TRACE). The default transient failure policy retries network-level cURL errors plus HTTP 408, 425, 429, 500, 502, 503, and 504 responses:
Notes
- The request URI must be absolute and include a host.
- The client supports HTTP/1.0, HTTP/1.1, HTTP/2, and HTTP/3 when the installed cURL build supports it.
- Request and response option bags reject cURL options that the client manages internally to preserve PSR-18 behavior.
All versions of psr18 with dependencies
ext-curl Version *
psr/http-client Version ^1.0
thingston/psr17 Version ^1.0