1
0
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:
Hannes Van De Vreken 2018-01-06 18:37:08 +01:00 committed by Tobias Nyholm
parent 6befd20dd6
commit aa5b807560

View File

@ -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');