bakerkretzmar / zttp
一个以开发者体验为中心的HTTP客户端,针对最常见的使用场景进行了优化。
0.6.1
2019-11-29 13:48 UTC
Requires
- php: >=7.2
- guzzlehttp/guzzle: ^6.4
- tightenco/collect: ^6.5
Requires (Dev)
- laravel/lumen-framework: ^6.2
- phpunit/phpunit: ^7.5
README
Zttp是一个简单的Guzzle包装器,旨在为大多数常见使用场景提供非常愉悦的开发体验。
如果你需要更多的功能,只需使用 Guzzle :)
真实文档正在制作中,但现在 阅读测试。
$response = Zttp::withHeaders(['Fancy' => 'Pants'])->post($url, [ 'foo' => 'bar', 'baz' => 'qux', ]); $response->status(); // int $response->isOk(); // true / false $response->json(); // => [ // 'whatever' => 'was returned', // ];
安装
composer require bakerkretzmar/zttp