Add HTTP client implementation (import clue/reactphp-buzz v2.9.0)#368
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This changeset adds an HTTP client implementation by importing clue/reactphp-buzz v2.9.0 and the underlying react/http-client v0.5.10. This client implementation uses a Promise-based API using common PSR-7 messages just like the existing server implementation, so they share common interfaces and concepts.
The code has been imported as-is, with only minor changes to the namespace from
Clue\React\BuzztoReact\Httpand we otherwise leave all the existing APIs unchanged. Deprecated client APIs have been dropped for this major release. As such, this is a pure feature addition with no BC breaks. Upgrading from clue/reactphp-buzz 2.9.0 to the upcoming react/http v1.0.0 should be a matter of updating some namespace references only:By promoting my existing HTTP client implementation clue/reactphp-buzz, we can now provide better support for this component and take advantage of a shared code base. Among others, a follow-up will eliminate a number of minor code duplicates and improve code reuse for specific HTTP edge cases. Upcoming changes will focus on some exciting and long-awaited features, but more on that in follow-up PRs.
See https://github.com/clue/reactphp-buzz for original repo. I'm planning to soft-deprecate this repository in the future and will redirect users to this HTTP component instead.
Resolves#148