王宁凯 / http
一个专注于开发者体验的HTTP客户端,针对最常见用例进行了优化。
v1.0.2
2020-03-09 05:58 UTC
Requires
- php: >=7.1.3
- guzzlehttp/guzzle: ^6.0
- tightenco/collect: ^5.0|^6.0|^7.0
Requires (Dev)
- laravel/lumen-framework: ^6.0
- phpunit/phpunit: ^6.0
This package is auto-updated.
Last update: 2024-09-18 09:11:04 UTC
README
Http是一个简单的Guzzle包装器,旨在为最常见用例提供真正愉悦的开发体验。
如果您需要更多功能,只需使用Guzzle :)
$response = Http::withHeaders(['Fancy' => 'Pants'])->post($url, [ 'foo' => 'bar', 'baz' => 'qux', ]); $response->status(); // int $response->isOk(); // true / false $response->json(); // => [ // 'whatever' => 'was returned', // ];
安装
composer require wangningkai/http