Overview of amphp/http-client features
5.xThe amphp/http-client is an event-driven, asynchronous HTTP client for PHP. Key capabilities include:
- Protocol Support: Supports HTTP/1 and HTTP/2 with connection pooling (keep-alive for HTTP/1.1 and multiplexing for HTTP/2).
- Concurrency: Requests are concurrent by default.
- Resource Management: Streams entity bodies for efficient memory management during large transfers and automatically decodes compressed bodies (gzip, deflate).
- Security & Standards: Implements secure-by-default TLS (
https://), supports all standard and custom HTTP methods, and simplifies form submissions. - Advanced Features: Transparently follows redirects, manages cookies and sessions, and functions behind HTTP proxies.