clarence / restful
一个RESTful客户端,尤其适用于异步请求。
v1.0.8
2018-03-01 06:06 UTC
Requires
- php: >=5.5
- ext-curl: *
Requires (Dev)
- phpunit/phpunit: 4.8
README
一个RESTful客户端,尤其适用于异步请求。
安装
通过Composer安装
composer require clarence/restful
通过github安装
git clone git@github.com:Clarence-pan/restful.git
用法
空谈无益。代码才是王道。
use Clarence\Restful\Curl\CurlRestClient; // Do a GET request $data = ['test' => 'test', 'hello' => 'world!']; $jsonResponse = $restClient->get('https://:8888/server/echo-globals.php', $data)->json(); // then use the $jsonRespose....