mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-24 18:13:00 +01:00
Merge pull request #1088 from eXtreme/patch-1
Update testing docs about History middleware
This commit is contained in:
commit
a2364f0a40
@ -62,14 +62,14 @@ history of the requests that were sent by a client.
|
||||
use GuzzleHttp\HandlerStack;
|
||||
use GuzzleHttp\Middleware;
|
||||
|
||||
$stack = HandlerStack::create();
|
||||
// Add the history middleware to the handler stack.
|
||||
$stack->append($history);
|
||||
|
||||
$client = new Client(['handler' => $stack]);
|
||||
|
||||
$container = [];
|
||||
$history = Middleware::history($container);
|
||||
|
||||
$stack = HandlerStack::create();
|
||||
// Add the history middleware to the handler stack.
|
||||
$stack->push($history);
|
||||
|
||||
$client = new Client(['handler' => $stack]);
|
||||
|
||||
$client->get('http://httpbin.org/get');
|
||||
$client->head('http://httpbin.org/get');
|
||||
|
Loading…
x
Reference in New Issue
Block a user