daa / restful-curl-php-wrapper
Composer based cURL restful wrapper
Installs: 19 067
Dependents: 2
Suggesters: 0
Security: 0
Stars: 4
Watchers: 1
Forks: 3
pkg:composer/daa/restful-curl-php-wrapper
Requires
- php: >=5.3.3
- ext-curl: *
This package is not auto-updated.
Last update: 2025-10-21 07:13:29 UTC
README
A simple composer based cURL wrapper providing RESTful HTTP requests
Usage
Add the following requirement to your composer file and do a composer install/update:
"require": {
...
"daa/restful-curl-php-wrapper": "1.*"
},
Instantiate a new client in your code:
use Curl\Sdk\HttpClient;
$client = new HttpClient;
Make your call:
try {
$response = $client->get($url);
$response = $client->post($url, $params);
$response = $client->put($url, $params);
$response = $client->delete($url);
} catch(\Exception $e) {
}