jorge-matricali/http-client
最新稳定版本:1.0.0-alpha3
Composer 安装命令:
composer require jorge-matricali/http-client
包简介
A wrapper of libcurl that implements PSR-7 HTTP message interface.
README 文档
README
PSR-7 HTTP Client (cURL)
Note that this is not an HTTP protocol implementation of its own. It is merely a wrapper of libcurl that implements PSR-7 HTTP message interface.
Requirements
- PHP 5.4 or newer
- cURL extension
Installation
composer require matricali/http-client
Usage
Sending GET request
use Matricali\Http\Client;
$client = new Client();
$response = $client->get('http://www.example.com/');
echo $response->getBody();
Sending POST request
use Matricali\Http\Client;
$client = new Client();
$payload = '{"name": "John Doe"}';
$response = $client->post('http://www.example.com/', $payload);
echo $response->getBody();
Contributing
Contributions, issues, pull requests are welcome. See CONTRIBUTING.md
License
php-http-client is MIT licensed.
统计信息
- 总下载量: 74.34k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-02-08