clarence / restful

一个RESTful客户端,尤其适用于异步请求。

v1.0.8 2018-03-01 06:06 UTC

This package is not auto-updated.

Last update: 2024-09-24 10:43:56 UTC


README

Build status

一个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....