gipfl/curl

ReactPHP-friendly async CURL abstraction

v0.3.0 2022-10-07 13:34 UTC

This package is auto-updated.

Last update: 2024-04-07 17:07:29 UTC


README

Mostly async CURL implementation to allow for an easier migration to ReactPHP for components depending on CURL features

Simple Example

<?php

use gipfl\Curl\CurlAsync;

$loop = \React\EventLoop\Factory::create();
$curl = new CurlAsync($loop);
$curl->get('https://www.nytimes.com');
$loop->run();

Limitations

For now, as a low-level library this implementation wants to be as transparent as possible. This means that there is no automagic handling of redirects. You get every Response and must be prepared to deal with all kind of status codes.