Releases: clue/reactphp-buzz
v0.5.0
-
Feature / BC break: Implement PSR-7 http-message interfaces
(#54 by @clue)Replace custom
Message
,Request
,Response
andUri
classes with
common PSR-7 interfaces:// old $browser->get($uri)->then(function (Response $response) { echo 'Test: ' . $response->getHeader('X-Test'); echo 'Body: ' . $response->getBody(); }); // new $browser->get($uri)->then(function (ResponseInterface $response) { if ($response->hasHeader('X-Test')) { echo 'Test: ' . $response->getHeaderLine('X-Test'); } echo 'Body: ' . $response->getBody(); });
-
Feature: Add streaming API
(#56 by @clue)$browser = $browser->withOptions(array('streaming' => true)); $browser->get($uri)->then(function (ResponseInterface $response) { $response->getBody()->on('data', function($chunk) { echo $chunk . PHP_EOL; }); });
-
Remove / BC break: Remove
Browser::resolve()
because it's now fully decoupled
(#55 by @clue)If you need this feature, consider explicitly depending on rize/uri-template
instead:$ composer require rize/uri-template
-
Use clue/block-react and new Promise API in order to simplify tests
(#53 by @clue)
v0.4.2
v0.4.1
-
Fix: Replace URI placeholders before applying base URI, in order to avoid
duplicate slashes introduced due to URI placeholders.
(#48)// now correctly returns "http://example.com/path" // instead of previous "http://example.com//path" $browser = $browser->withBase('http://example.com/'); echo $browser->resolve('{+path}', array('path' => '/path')); // now correctly returns "http://example.com/path?q=test" // instead of previous "http://example.com/path/?q=test" $browser = $browser->withBase('http://example.com/path'); echo $browser->resolve('{?q}', array('q' => 'test'));
v0.4.0
-
Feature: Resolve relative URIs, add withBase() and resolve()
(#41, #44)$browser = $browser->withBase('http://example.com/'); $browser->post('/');
-
Feature: Resolve URI template placeholders according to RFC 6570
(#42, #44)$browser->post($browser->resolve('/{+path}{?version}', array( 'path' => 'demo.json', 'version' => '4' )));
-
Feature: Resolve and follow redirects to relative URIs
(#45) -
Feature / BC break: Simplify Request and Response objects.
Remove Browser::request(), use Browser::send() instead.
(#37)// old $browser->request('GET', 'http://www.example.com/'); // new $browser->send(new Request('GET', 'http://www.example.com/'));
-
Feature / Bc break: Enforce absolute URIs via new Uri class
(#40, #44) -
Feature: Add Browser::withSender() method
(#38) -
Feature: Add Sender::createFromLoopDns() function
(#39) -
Improve documentation and test suite
v0.3.0
- Expose Response object in case of HTTP errors
(#35) - Feature: Add experimental
Transaction
options viaBrowser
(#25) - Feature: Add experimental streaming API
(#31) - Feature: Automatically assign a "Content-Length" header for outgoing
Request
s
(#29) - Feature: Add
Message::getHeader()
, it is now available on bothRequest
andResponse
(#28)