File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ TODO: create client instance with discovery and do some requests
37
37
When using an asynchronous client, it will use a PSR-7 ` RequestInterface ` and returns a ` Http\Client\Promise ` :
38
38
39
39
``` php
40
- $httpAsyncClient = new HttpAsyncClientImplementation();
40
+ use Http\Discovery\HttpAsyncClientDiscovery;
41
+
42
+ $httpAsyncClient = HttpAsyncClientDiscovery::find();
41
43
$promise = $httpAsyncClient->sendAsyncRequest($request);
42
44
```
43
45
@@ -112,7 +114,9 @@ This promise allows you to :
112
114
Here is a full example of a classic usage when using the ` sendAsyncRequest ` method:
113
115
114
116
``` php
115
- $httpAsyncClient = new HttpAsyncClientImplementation();
117
+ use Http\Discovery\HttpAsyncClientDiscovery;
118
+
119
+ $httpAsyncClient = HttpAsyncClientDiscovery::find();
116
120
117
121
$promise = $httpAsyncClient->sendAsyncRequest($request);
118
122
$promise->then(function (ResponseInterface $response) {
You can’t perform that action at this time.
0 commit comments