Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Http Client Laravel Package

amphp/http-client

Async HTTP client for PHP built on Amp. Send concurrent requests with connection pooling, timeouts, redirects, proxies, TLS support, and streaming request/response bodies. Includes PSR-7/PSR-18 integration and middleware-style interceptors.

View on GitHub
Deep Wiki
Context7
v5.3.4

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: https://github.com/amphp/http-client/compare/v5.3.3...v5.3.4

v5.3.3

What's Changed

  • Provided a better fix for #390, restoring back-pressure on the connection as the response body is consumed

Full Changelog: https://github.com/amphp/http-client/compare/v5.3.2...v5.3.3

v5.3.2

What's Changed

  • Fixed HTTP/1.x connections remaining open if the response body was not fully consumed (#390)

Full Changelog: https://github.com/amphp/http-client/compare/v5.3.1...v5.3.2

v5.3.1

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: https://github.com/amphp/http-client/compare/v5.3.0...v5.3.1

v5.3.0

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/http-client/compare/v5.2.2...v5.3.0

v5.2.2

What's Changed

  • Changed the default User-Agent header 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_STREAM flag set (#373).
  • Fixed early responses on HTTP/2 (a response sent before the request is fully sent) causing an HttpException to be thrown instead of returning the response.

Full Changelog: https://github.com/amphp/http-client/compare/v5.2.1...v5.2.2

v5.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/http-client/compare/v5.2.0...v5.2.1

v4.6.5

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/http-client/compare/v4.6.4...v4.6.5

v5.2.0

What's Changed

  • Added inactivity timeout to SetRequestTimeout interceptor by @Nek- in https://github.com/amphp/http-client/pull/362
  • Fixed the exception type thrown by SizeLimitingReadableStream, changing it to StreamException to comply with the ReadableStream interface
  • Fixed body size limit of 0 (no limit) causing an exception when using DecompressingReadableStream
  • Fixed handling of GOAWAY frames from servers, allowing streams with an ID lower than that provided in the GOAWAY frame to complete before closing the connection (#366)

New Contributors

Full Changelog: https://github.com/amphp/http-client/compare/v5.1.0...v5.2.0

v5.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/http-client/compare/v5.0.1...v5.1.0

v4.6.4
v5.0.1

What's Changed

Full Changelog: https://github.com/amphp/http-client/compare/v5.0.0...v5.0.1

v5.0.0

Stable release compatible with AMPHP v3 and fibers! 🎉

As with other libraries compatible with AMPHP v3, most cases of parameters or returns of Promise<ResolutionType> have been replaced with ResolutionType.

  • Request instances are mutable now and can no longer be reused.
  • Removed cloning of request attributes – You can use any value in attributes now.
  • 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.
  • Renamed header methods using the term "raw" to use "pairs" instead, e.g., getRawHeaders()getHeaderPairs(), parseRawHeaders()parseHeaderPairs()
  • Changed timeout unit from milliseconds to seconds (like timers in the event loop)
  • Removed UnprocessedRequestException, use Request::isUnprocessed() instead.
  • The EventListener interface has been reworked and event listeners can be registered with HttpClientBuilder::listen() now to automatically apply to each request instead of only being registered on specific requests.
  • Replaced FormBody with new Form API
    • Repeated form fields are no longer sent in PHP specific encoding, i.e. 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.
  • Replaced RequestBody with new HttpContent API
    • Added BufferedContent
    • Added StreamedContent
    • Removed Body\FileBody
    • Removed Body\FormBody
    • Removed Body\JsonBody
    • Removed Body\StreamBody
    • Removed Body\StringBody

There are no changes compared to 5.0.0 Beta 17.

v5.0.0-beta.17

What's Changed

  • Fixed event transitions for CONNECT requests

Full Changelog: https://github.com/amphp/http-client/compare/v5.0.0-beta.16...v5.0.0-beta.17

v5.0.0-beta.16

What's Changed

  • Fixed HTTP/2 request bodies (regression introduced in 5.0.0 Beta 14)
  • Fixed event phase issue for rejected requests (#351)

Full Changelog: https://github.com/amphp/http-client/compare/v5.0.0-beta.15...v5.0.0-beta.16

v5.0.0-beta.15

What's Changed

  • Fixed Invalid request phase transition from Connect to RequestHeaders (#347)
  • Replace connect* and tls* events on EventListener with new connectionAcquired event. Timings are exposed via methods on Connection now.
  • Added EventListener::push() to indicate pushed responses to the EventListener and copy event listeners to pushed requests from the parent request to ensure they're called.
  • Changed EventListener::requestFailed to accept any Throwable
  • Added clone support for Request
  • Fixed retries, which didn't clone requests before
  • Remove UnprocessedRequestException by @kelunik in https://github.com/amphp/http-client/pull/349, use Request::isUnprocessed() instead.
  • Remove Request::isStarted()

Full Changelog: https://github.com/amphp/http-client/compare/v5.0.0-beta.14...v5.0.0-beta.15

v5.0.0-beta.14

What's Changed

New event system by @kelunik in https://github.com/amphp/http-client/pull/334:

The EventListener interface has been reworked and event listeners can be registered with HttpClientBuilder::listen() now to automatically apply to each request instead of only being registered on specific requests.

Request phases are now rather strict and checks are in place to ensure the correct order of events. Should you notice any issues with that, please open an issue!

The two remaining issues we want to solve before the stable release are:

Full Changelog: https://github.com/amphp/http-client/compare/v5.0.0-beta.13...v5.0.0-beta.14

v5.0.0-beta.13
  • Add league/uri ^7 support, resulting in psr/http-message ^2 support
  • Clone requests before processing them in FollowRedirects to avoid headers of later interceptors being copied to the new request, fixing e.g. raw GZip response bodies on double redirects (#341)

Full Changelog: https://github.com/amphp/http-client/compare/v5.0.0-beta.12...v5.0.0-beta.13

v4.6.3

What's Changed

New Contributors

Full Changelog: https://github.com/amphp/http-client/compare/v4.6.2...v4.6.3

v5.0.0-beta.12
v5.0.0-beta.11
  • Removed cloning of requests – Requests are no longer clonable and no longer cloned when passed to HttpClient and in other locations.
  • Removed cloning of request attributes – You can use any value in attributes now.
  • Following redirects creates a new request now instead of cloning the original request (therefore resetting attributes)
  • Replaced FormBody with new Form API
    • Repeated form fields are no longer sent in PHP specific encoding, i.e. 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.
  • Replaced RequestBody with new HttpContent API
    • Added BufferedContent
    • Added StreamedContent
    • Removed Body\FileBody
    • Removed Body\FormBody
    • Removed Body\JsonBody
    • Removed Body\StreamBody
    • Removed Body\StringBody
  • Fixed potential HPack concurrency issue on HTTP/2 connections
v5.0.0-beta.10

Updated for compatibility with amphp/http@2.0-beta.3

v5.0.0-beta.9
  • 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.
  • Renamed header methods using the term "raw" to use "pairs" instead, e.g., getRawHeaders()getHeaderPairs(), parseRawHeaders()parseHeaderPairs()
v5.0.0-beta.8
  • Updated for compatibility with 2.0 of amphp/socket.
  • Changed dependency on amphp/http to 2.0.
v5.0.0-beta.7
  • Fixed compatibility with v2.0 of amphp/byte-stream by updating ReadableStream implementations to also implement Traversable.
  • Fixed assigning the stream ID to HTTP/2 streams to guarantee stream IDs are sent sequentially to the server
  • Fixed CancelledException being wrapped in an HttpException when a request is cancelled
v5.0.0-beta.6
  • Fixed HEAD requests using HTTP/2 when a Content-Length header was included in the response.
  • Fixed a memory leak in the HTTP/2 handler due to the write fiber not being destroyed.
v5.0.0-beta.5
  • Added compatibility with Revolt v1.x
v5.0.0-beta.4
  • Fixed destruct order issue in Http2Stream
  • Fixed backpressure for response body for HTTP/1.x
  • Add ResolveBaseUri interceptor
v5.0.0-beta.3
  • Fixed a memory leak in the HTTP/2 connection processor when reusing a connection over a long period of time
  • Removed deprecated exception classes Http2ConnectionException and Http2StreamException.
v5.0.0-beta.2
  • Fixed #302 where reusing an idle HTTP/1.1 connection may cause the connection to hang.
  • Fixed reusing a closed connection in the connection pool.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport