mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-23 09:34:00 +01:00
Missing sendAsync call (#1985)
* Missing sendAsync call * Fixed response -> promise
This commit is contained in:
parent
6befd20dd6
commit
aa5b807560
@ -134,6 +134,7 @@ You can also use the `sendAsync()` and `requestAsync()` methods of a client:
|
|||||||
$headers = ['X-Foo' => 'Bar'];
|
$headers = ['X-Foo' => 'Bar'];
|
||||||
$body = 'Hello!';
|
$body = 'Hello!';
|
||||||
$request = new Request('HEAD', 'http://httpbin.org/head', $headers, $body);
|
$request = new Request('HEAD', 'http://httpbin.org/head', $headers, $body);
|
||||||
|
$promise = $client->sendAsync($request);
|
||||||
|
|
||||||
// Or, if you don't need to pass in a request instance:
|
// Or, if you don't need to pass in a request instance:
|
||||||
$promise = $client->requestAsync('GET', 'http://httpbin.org/get');
|
$promise = $client->requestAsync('GET', 'http://httpbin.org/get');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user