We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 94b31fe commit a5dff9fCopy full SHA for a5dff9f
README.md
@@ -37,29 +37,3 @@ foreach ($client->get('https://jsonplaceholder.typicode.com/posts/1') as $respon
37
}
38
```
39
40
-## Parallel Requests
41
-
42
-```php
43
-<?php
44
45
-require_once('vendor/autoload.php');
46
47
-use Async\Http\AsyncHttpClient;
48
-use Async\Http\MultiAsyncHandler;
49
50
-$client = new AsyncHttpClient();
51
-$multi = new MultiAsyncHandler();
52
53
-$urls = [
54
- 'https://jsonplaceholder.typicode.com/posts/1',
55
- 'https://jsonplaceholder.typicode.com/posts/2',
56
-];
57
58
-foreach ($urls as $url) {
59
- $multi->add(fn() => $client->get($url), function($res) use ($url) {
60
- echo "[$url] => " . substr($res->getBody(), 0, 80) . "\n";
61
- });
62
-}
63
64
-$multi->run();
65
-```
0 commit comments