choval / reactphp-curl-proc
Async Curl using React\ChildProcess
Installs: 183
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/choval/reactphp-curl-proc
Requires
- clue/block-react: ^1.3
- react/child-process: ^0.6
Requires (Dev)
- phpunit/phpunit: ^7
- react/promise-stream: ^1.1
This package is auto-updated.
Last update: 2025-09-12 09:23:35 UTC
README
WARNING: THIS IS NOT PRODUCTION READY
Async Curl library for ReactPHP. This library uses the curl binary of the system.
Rationale
HttpClient and BuzzBrowser are not capable of handling cookies and/or large file uploads.
Installation
composer require choval/reactphp-curl-proc:dev-master
Usage
use choval\React\Curl;
use choval\React\CurlResponse;
$loop = React\EventLoop\Factory::create();
$curl = new Curl($loop);
$curl->get('http://google.com/')
->then(function(CurlResponse $resp) {
echo $resp->getBody();
})
->otherwise(function(Exception $e) {
echo 'ERROR: '.$e->getMessage().PHP_EOL;
});