An advanced async HTTP client library for PHP, enabling efficient, non-blocking, and concurrent requests and responses.
FollowRedirects
(#332)Form
Form
, see https://github.com/amphp/http-client/commit/69fc08412b2497314d384e7f6dfd2bd5dbf4c9ec
HttpClient
and in other locations.FormBody
with new Form
API
appids=30&appids=20
instead of appids%5B0%5D=30&appids%5B1%5D=20
(#340)
If you need the previous names, add []
to the name of your field.RequestBody
with new HttpContent
API
BufferedContent
StreamedContent
Body\FileBody
Body\FormBody
Body\JsonBody
Body\StreamBody
Body\StringBody
Updated for compatibility with amphp/[email protected]
Request
now extends HttpRequest
from amphp/http
, gaining methods to get and set query parameters on the request instead of needing to manipulate the URI object directly.getRawHeaders()
→ getHeaderPairs()
, parseRawHeaders()
→ parseHeaderPairs()
2.0
of amphp/socket
.amphp/http
to 2.0
.v2.0
of amphp/byte-stream
by updating ReadableStream
implementations to also implement Traversable
.CancelledException
being wrapped in an HttpException
when a request is cancelledHEAD
requests using HTTP/2 when a Content-Length
header was included in the response.Http2Stream
ResolveBaseUri
interceptorHttp2ConnectionException
and Http2StreamException
.