alc/curl

This package is abandoned and no longer maintained. No replacement package was suggested.

Curl Wrapper

v1.1.2 2017-01-27 19:18 UTC

This package is auto-updated.

Last update: 2021-05-18 19:15:23 UTC


README

Curl Wrapper

## Install via composer

Edit your composer.json file to include the following:

{
    "require": {
        "alc/curl": "dev-master"
    }
}

Usage

use Alc\Curl\Curl;

$curl = new Curl();

// GET request
$response = $curl->get('http://httpbin.org/get');
var_dump( $response->getStatusCode() );
print_r( $response->getJson() );

// POST request
$response = $curl->post('http://httpbin.org/post', array('var1' => 1, 'var2' => 2));
print_r( $response->getJson() );