Skip to content

DannyMeyer/guzzlehttp-multicurl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GuzzleHttp-multicurl

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);

About

A helper for multicurl requests with GuzzleHttp

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages