dannymeyer / guzzlehttp-multicurl
DI helper
v1.0.0
2020-09-19 22:55 UTC
Requires
- ext-json: *
- guzzlehttp/guzzle: ^6.5
Requires (Dev)
- phpstan/phpstan: ^0.12.43
- phpunit/phpunit: ^8.0
- symplify/easy-coding-standard: ^7.1
This package is auto-updated.
Last update: 2025-01-19 23:39:45 UTC
README
A helper for easy asynchronous multicurl requests with GuzzleHttp
Usage
$curl = new \DannyMeyer\Curl\Multicurl(); $curl->addGetRequestByUri('https://my.domain/ExampleRequest'); $curl->addGetRequestByUri('https://my.domain/AnotherExampleRequest'); $result = $curl->execute(); if ($curl->hasErrors()) { var_dump($curl->getErrors()); }
Add Request with Authentication
$curl = new \DannyMeyer\Curl\Multicurl(); $request = new \GuzzleHttp\Psr7\Request( 'get', 'https://my.domain/ExampleRequest', ['Authorization' => 'Basic ' . \base64_encode('User:Password')] ); $curl->addRequest($request);