Skip to content

Commit 9d7f109

Browse files
committed
minor #14451 use the right method when dealing with promises (michelv)
This PR was merged into the 4.4 branch. Discussion ---------- use the right method when dealing with promises sendRequest() returns a response, not a promise, and we can't use then() on a response Commits ------- 4155cc2 use the right method when dealing with promises
2 parents 2cc077f + 4155cc2 commit 9d7f109

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http_client.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,7 @@ Then you're ready to go::
12911291

12921292
$httpClient = new HttplugClient();
12931293
$request = $httpClient->createRequest('GET', 'https://my.api.com/');
1294-
$promise = $httpClient->sendRequest($request)
1294+
$promise = $httpClient->sendAsyncRequest($request)
12951295
->then(
12961296
function (ResponseInterface $response) {
12971297
echo 'Got status '.$response->getStatusCode();

0 commit comments

Comments
 (0)