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
3737When using an asynchronous client, it will use a PSR-7 ` RequestInterface ` and returns a ` Http\Client\Promise ` :
3838
3939``` php
40- $httpAsyncClient = new HttpAsyncClientImplementation();
40+ use Http\Discovery\HttpAsyncClientDiscovery;
41+
42+ $httpAsyncClient = HttpAsyncClientDiscovery::find();
4143$promise = $httpAsyncClient->sendAsyncRequest($request);
4244```
4345
@@ -112,7 +114,9 @@ This promise allows you to :
112114Here is a full example of a classic usage when using the ` sendAsyncRequest ` method:
113115
114116``` php
115- $httpAsyncClient = new HttpAsyncClientImplementation();
117+ use Http\Discovery\HttpAsyncClientDiscovery;
118+
119+ $httpAsyncClient = HttpAsyncClientDiscovery::find();
116120
117121$promise = $httpAsyncClient->sendAsyncRequest($request);
118122$promise->then(function (ResponseInterface $response) {
You can’t perform that action at this time.
0 commit comments