lyoshenka / curl
A better way to cURL
Installs: 868
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/lyoshenka/curl
Requires
- php: >=5.6
- ext-curl: *
This package is not auto-updated.
Last update: 2025-10-04 03:18:54 UTC
README
A simple wrapper around Curl to make it easy to use.
No more curl_init()
, no more struggling to get response headers, etc.
Two ways to use it
The functional way
echo \lyoshenka\curl::get('http://httpbin.org/user-agent', [], ['headers' => ['User-Agent' => 'nice!']]);
The fluent OO way
echo \lyoshenka\curl::init() ->setMethod('GET') ->setUrl('http://httpbin.org/user-agent') ->setHeader('User-Agent', 'also nice!') ->send() ->getBody();