react/http-client
Deprecated ReactPHP streaming, event-driven HTTP client kept for BC. Development moved to react/http with a new Promise-based, PSR-7 Browser API. Upgrade recommended; see react/http for current client usage and features.
Fix: Ignore excessive whitespace in chunk header for Transfer-Encoding: chunked
(#123 by @DangerLifter and @clue)
Fix: Ignore invalid incoming Transfer-Encoding response header
(#122 by @clue)
Improve documentation for Client (and advanced Connector)
(#111 by @jsor and #121 by @clue)
Improve test suite by adding support for PHPUnit 6 (#112 by @carusogabriel)
Feature: Update Socket dependency to support hosts file on all platforms (#108 by @clue)
This means that HTTP requests to hosts such as localhost will now work as
expected across all platforms with no changes required:
$client = new Client($loop);
$request = $client->request('GET', 'http://localhost/');
$request->on('response', function (Response $response) {
// …
});
$request->end();
Feature: Target evenement 3.0 a long side 2.0 (#106 by @WyriHaximus)
Improve test suite by locking Travis distro so new defaults will not break the build (#105 by @clue)
Fix: Minimal fix for PHP 8 (#154 by @remicollet)
Documentation: Add deprecation notice to suggest HTTP component instead (#153 by @clue)
Fix: Avoid unneeded warning when decoding invalid data on PHP 7.4. (#150 by @clue)
Add .gitattributes to exclude dev files from exports.
(#149 by @reedy)
Link to clue/reactphp-buzz for higher-level HTTP client. (#139 by @clue)
Improve test suite by simplifying test matrix and test setup. (#151 by @clue)
Feature / BC break: Replace Factory with simple Client constructor
(#85 by @clue)
The Client now accepts a required LoopInterface and an optional
ConnectorInterface. It will now create a default Connector if none
has been given.
// old
$dnsResolverFactory = new React\Dns\Resolver\Factory();
$dnsResolver = $dnsResolverFactory->createCached('8.8.8.8', $loop);
$factory = new React\HttpClient\Factory();
$client = $factory->create($loop, $dnsResolver);
// new
$client = new React\HttpClient\Client($loop);
Feature: Request::close() now cancels pending connection attempt
(#91 by @clue)
Feature / BC break: Replace deprecated SocketClient with new Socket component (#74, #84 and #88 by @clue)
Feature / BC break: Consistent stream semantics and forward compatibility with upcoming Stream v1.0 (#90 by @clue)
Feature: Forward compatibility with upcoming EventLoop v1.0 and v0.5 (#89 by @clue)
Fix: Catch Guzzle parser exception (#82 by @djagya)
Response::getBody()$loop argument from HttpClient: Client, Request, ResponseHow can I help you explore Laravel packages today?