mirror of
https://github.com/guzzle/guzzle.git
synced 2025-03-14 19:29:49 +01:00
Fix error on quickstart for concurrent requests (#2574)
The example fixed gives an error as it is at the moment: `Fatal error: Uncaught Error: Call to a member function getHeader() on array` The fix provides the right code for the example.
This commit is contained in:
parent
223b0fe5ef
commit
837b5a3554
@ -192,8 +192,8 @@ requests.
|
||||
$responses = Promise\settle($promises)->wait();
|
||||
|
||||
// You can access each response using the key of the promise
|
||||
echo $responses['image']->getHeader('Content-Length')[0];
|
||||
echo $responses['png']->getHeader('Content-Length')[0];
|
||||
echo $responses['image']['value']->getHeader('Content-Length')[0];
|
||||
echo $responses['png']['value']->getHeader('Content-Length')[0];
|
||||
|
||||
You can use the ``GuzzleHttp\Pool`` object when you have an indeterminate
|
||||
amount of requests you wish to send.
|
||||
|
Loading…
x
Reference in New Issue
Block a user