一个以开发者体验为中心的HTTP客户端,针对最常见的使用场景进行了优化。

0.6.1 2019-11-29 13:48 UTC

This package is auto-updated.

Last update: 2024-08-29 05:28:14 UTC


README

Build Status

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