amphp/http-client
An advanced async HTTP client library for PHP, enabling efficient, non-blocking, and concurrent requests and responses.
v5.3.6
12M downloads/mo
#561 most downloaded on Packagist
amphp/http-client
What this package is like to depend on
Last release 3 months ago
15 May 2026
Release timing varies
gaps range from 3 weeks to 9 months
Some releases are documented
notes for 26 of 75 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
113 releases · first in 2012
3 releases in the last 12 months
see the full history below
Release timeline
113 releases · Dec 2012 to May 2026Releases
latest 60 of 113-
v5.3.615 May 2026Release notes
Open source → -
v5.3.513 May 2026Release notes
Open source → -
v5.3.416 Aug 2025Release notes
Open source →What's Changed
- Fixed an issue where an HTTP/2 connection was closed unexpectedly, on rare occasions an exception was being thrown to the event-loop error handler
- Made an optimization when shutting down an HTTP/2 connection to only create an exception instance if there are outstanding requests on the connection.
Full Changelog: v5.3.3...v5.3.4
-
v5.3.321 May 2025Release notes
Open source →What's Changed
- Provided a better fix for #390, restoring back-pressure on the connection as the response body is consumed
Full Changelog: v5.3.2...v5.3.3
-
v5.3.218 May 2025Release notes
Open source →What's Changed
- Fixed HTTP/1.x connections remaining open if the response body was not fully consumed (#390)
Full Changelog: v5.3.1...v5.3.2
-
v5.3.130 Apr 2025Release notes
Open source →What's Changed
- Fixed setting the stream "ended" flag on HTTP/2 streams for requests which have no body (regression in 5.3.0). Without this flag, an empty data frame was being sent, which was considered invalid by some HTTP/2 servers, causing the stream to be closed without completing the response.
Full Changelog: v5.3.0...v5.3.1
-
v5.3.016 Mar 2025Release notes
Open source →What's Changed
- Enhance TLS handshake error message with additional details from previous exception by @luzrain in #385
- Proposal: TlsException to replace SocketException for TLS handshake errors by @luzrain in #384
- Support for simultaneously streaming request body and response body by @Nek- and @trowski in #380
- Throws TimeoutException when TransferTimeout is exceeded by @luzrain in #382
New Contributors
Full Changelog: v5.2.2...v5.3.0
-
v5.2.212 Jan 2025Release notes
Open source →What's Changed
- Changed the default
User-Agentheader to contain only characters which should be accepted by all HTTP servers (#371). - Fixed window update potentially causing two HTTP/2 frames to be sent with the
END_STREAMflag set (#373). - Fixed early responses on HTTP/2 (a response sent before the request is fully sent) causing an
HttpExceptionto be thrown instead of returning the response.
Full Changelog: v5.2.1...v5.2.2
- Changed the default
-
v5.2.113 Dec 2024 -
v5.2.007 Dec 2024Nothing published for this version
-
v5.1.021 Apr 2024Nothing published for this version
-
v5.0.111 Dec 2023Nothing published for this version
-
v5.0.008 Oct 2023Nothing published for this version
-
v5.0.0-beta.1705 Sep 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.1603 Sep 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.1530 Aug 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.1423 Aug 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.1315 Aug 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.1205 Aug 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.1113 Apr 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.1009 Apr 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.926 Mar 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.801 Feb 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.708 Jan 2023 pre-releaseNothing published for this version
-
v5.0.0-beta.618 Nov 2022 pre-releaseNothing published for this version
-
v5.0.0-beta.507 Nov 2022 pre-releaseNothing published for this version
-
v5.0.0-beta.404 Oct 2022 pre-releaseNothing published for this version
-
v5.0.0-beta.320 May 2022 pre-releaseNothing published for this version
-
v5.0.0-beta.208 May 2022 pre-releaseNothing published for this version
-
v5.0.0-beta.124 Apr 2022 pre-releaseNothing published for this version
-
v4.6.614 May 2026Release notes
Open source →What's Changed
- Use
str_increment()to fix PHP 8.5+ deprecation - Avoid deprecation notice from
league/urion PHP 8.4+
Full Changelog: v4.6.5...v4.6.6
- Use
-
v4.6.513 Dec 2024Nothing published for this version
-
v4.6.421 Mar 2024Nothing published for this version
-
v4.6.315 Aug 2023Nothing published for this version
-
v4.6.209 Oct 2021 -
v4.6.112 Jul 2021Release notes
Open source →- Fixed
terequest header fields being sent via HTTP/2 instead of being stripped (unless the value istrailers)
4.6.0
- Add support for
amphp/filev2 (#295) - Fix some parameter names not aligning with parent classes / interfaces.
- Fixed
-
v4.6.029 Jun 2021Nothing published for this version
-
v4.5.523 Dec 2020 -
v4.5.429 Nov 2020Release notes
Open source →- Avoid increasing HTTP/2 window size if too many bytes are buffered locally, avoiding exploding buffers if the consumer is slow.
- Fix inactivity timeout on HTTP/2 with slow consumers. Slowly reading the response shouldn't result in inactivity timeouts if the server is responsive.
- Check for HTTP/1 connection closing while idle (#279)
-
v4.5.322 Nov 2020Release notes
Open source →- Account for server window changes when discarding data frames If streams are cancelled, this might result in hanging connections, because the client thinks the server window is still large enough and doesn't increase it.
- Fixed potential state synchronization errors with async event listeners
- Write stream window increments asynchronously, avoiding increments for already closed streams
- Improved exception messages
-
v4.5.203 Nov 2020 -
v4.5.125 Oct 2020Release notes
Open source →- Retry idempotent requests on
Http2ConnectionException - Fix graceful HTTP/2 connection shutdown
- Improve behavior if HTTP/2 connections become unresponsive
- Retry idempotent requests on
-
v4.5.021 Jul 2020Release notes
Open source →- Added support for resolving protocol relative URLs (#275)
- Added
FormBody::addFileFromString()
-
v4.4.110 Jul 2020Release notes
Open source →- Reject pushes with invalid stream ID
- Fix potential double stream release, which might result in int → float overflows and thus type errors
-
v4.4.016 Jun 2020Release notes
Open source →This version fixes a security weakness that might leak sensitive request headers from the initial request to the redirected host on cross-domain redirects, which were not removed correctly.
Message::setHeadersdoes not replace the entire set of headers, but only operates on the headers matching the given array keys, see fa79253.- Support direct HTTP/2 connections without TLS (#271)
- Security: Remove headers on cross-domain redirects
-
v4.3.110 May 2020Release notes
Open source →- Relax
"conflict"rule withamphp/fileto allowdev-masterinstallations with Composer v1.x (#267, composer/composer#8856) - Error if request URI provides a relative path instead of sending an invalid request (#269)
- Relax
-
v4.3.003 May 2020Release notes
Open source →- Added inactivity timeout (#263) This provides a separate timeout while waiting for the response or streaming the body. If no data is received for the response within the given number of milliseconds, the request fails similarly to the transfer timeout.
- Close idle connections if there are too many Requesting URLs from many hosts without reusing connections will otherwise result in resource exhaustion due to too many open files.
- Improved types for static analysis
-
v4.2.217 Mar 2020 -
v4.2.107 Mar 2020Release notes
Open source →- Fixed HTTP/2 on 32 bit platforms
- Fixed potentially stalled requests in ConnectionLimitingPool (#256)
-
v4.2.027 Feb 2020Release notes
Open source →- Add improved ConnectionLimitingPool The new ConnectionLimitingPool limits connections instead of streams. In addition, it has improved connection handling, racing between new connections and existing connections becoming available once the limit has been reached. The older LimitedConnectionPool has been renamed to StreamLimitingPool with a class alias for backward compatibility.
- Don't set ALPN if only HTTP/1.1 is enabled, which allows connections to certain misbehaving servers (#255)
-
v4.1.017 Jan 2020Release notes
Open source →- Fix possible double resolution of promises (#244)
- Fix assertion error on invalid HTTP/2 frame (#236)
- Fix HTTP/2 connection reuse if too many concurrent streams for one connection are in use (#246)
- Allow skipping default
accept,accept-encodinganduser-agentheaders (#238) - Keep original header case for HTTP/1 requests (#250)
- Allow access to informational responses (1XX) (#239)
- Await
startReceiveResponseevent listeners on HTTP/2 before resolving the response promise (#254) - Delay
startReceiveResponseevent until the final response is started to be received, instead of calling it for the first byte or multiple times for HTTP/2 (#254) - Use common HTTP/2 parser from
amphp/http
4.0.0
Initial release of
amphp/http-client, the successor ofamphp/artax. This is a major rewrite to support interceptors and HTTP/2.Major Changes
- Support for HTTP/2 (including push)
- Support for interceptors to customize behavior
- Switch to a mutable
Request/ResponseAPI, because streams are never immutable - Compatibility with
amphp/socket@^1 - Compatibility with
amphp/file@^1 - Compatibility with
league/uri@^6
3.x - 1.x
Please refer to
CHANGELOD.mdinamphp/artax. -
v4.1.0-rc105 Jan 2020 pre-releaseNothing published for this version
-
v4.0.021 Dec 2019Nothing published for this version
-
v4.0.0-rc920 Nov 2019 pre-releaseNothing published for this version
-
v4.0.0-rc805 Nov 2019 pre-releaseNothing published for this version
-
v4.0.0-rc701 Nov 2019 pre-releaseNothing published for this version
-
v4.0.0-rc608 Oct 2019 pre-releaseNothing published for this version
-
v4.0.0-rc517 Sep 2019 pre-releaseNothing published for this version
-
v4.0.0-rc412 Sep 2019 pre-releaseNothing published for this version
-
v4.0.0-rc307 Sep 2019 pre-releaseNothing published for this version