kyledong / http
一个简单的 http/https 客户端
1.0.1
2021-11-23 09:43 UTC
Requires
- php: >=7.2
- guzzlehttp/guzzle: ^6.3|^7.0
Requires (Dev)
- ext-gd: *
- ext-json: *
This package is auto-updated.
Last update: 2024-09-26 16:33:47 UTC
README
一个简单的 http/https 客户端
安装
composer require kyledong/http
示例
$client = Client::getInstance([
//域名
'base_uri' => '',
//请求头
'headers' => [],
//false 不验证ssl,true 验证ssl
'verify' => false
]);
//get请求
$data = $client->get('uri',[]);
//post请求
$data = $client->post('uri',[]);
//json格式请求
$data = $client->sendJson('uri',[],'GET');