CURL Wrapper
VERSION = 0.0.1
PHP >= 5.2
For return response body as XML need SimpleXMLElement
Include Http class to .php file
require_once('Http.php');Initialize new Class, and use methods like
$http = Http::get($url);
$http->json();$http->url - current URL
$http->method - current method
$http->request - requested data
$http->response - server response
$http->info - connection information
$http->json()- return response body as json
$http->xml()- return response body as xml
$http = Http::get($url);$http = Http::post($url, $data);$data - request data
$http = Http::put($url, $data);$http = Http::patch($url, $data);$http = Http::delete($url, $data);- Fork it ( https://github.com/stepanovit/http_curl_wrapper/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request