yadakhov / curl
A simple php curl wrapper class.
v1.1.0
2021-04-30 18:33 UTC
Requires
- php: >=5.2.0
Requires (Dev)
- phpunit/phpunit: ~5.0
This package is auto-updated.
Last update: 2024-10-29 04:25:39 UTC
README
A simple curl wrapper class to perform GET and POST.
Installation
Install from packagist
composer require yadakhov/curl
Or add to your composer.json
"require": {
"yadakhov/laradump": "^1.0"
},
The api interface.
public static getInstance();
public function get($url, array $params = []);
public function post($url, array $params = []);
Perform a GET request
$curl = new \Yadakhov\Curl; $curl->get('http://example.com');
Perform a POST request
$response = Curl::getInstance()->post('http://example.com', ['id' => '1']);