clarence / restful
A RESTful client, especially for async requests.
v1.0.8
2018-03-01 06:06 UTC
Requires
- php: >=5.5
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: 4.8
README
A RESTful client, especially for async requests.
Install
From Composer
composer require clarence/restful
From github
git clone git@github.com:Clarence-pan/restful.git
Usage
Talk is cheap. Show the code:
use Clarence\Restful\Curl\CurlRestClient; // Do a GET request $data = ['test' => 'test', 'hello' => 'world!']; $jsonResponse = $restClient->get('http://localhost:8888/server/echo-globals.php', $data)->json(); // then use the $jsonRespose....