Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kitetail/zttp
A developer-experience focused HTTP client, optimized for most common use cases.
https://github.com/kitetail/zttp
Last synced: 3 months ago
JSON representation
A developer-experience focused HTTP client, optimized for most common use cases.
- Host: GitHub
- URL: https://github.com/kitetail/zttp
- Owner: kitetail
- License: mit
- Created: 2017-05-25T19:53:39.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-08-12T14:53:40.000Z (over 3 years ago)
- Last Synced: 2024-09-08T01:37:57.864Z (4 months ago)
- Language: PHP
- Homepage:
- Size: 69.3 KB
- Stars: 1,676
- Watchers: 30
- Forks: 119
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
- favorite-link - 以开发人员为中心的 HTTP 客户端,针对大多数常见用例进行了优化。
README
# Zttp
Zttp is a simple Guzzle wrapper designed to provide a really pleasant development experience for most common use cases.
If you need more functionality, just use [Guzzle](https://github.com/guzzle/guzzle) :)
Real documentation is in the works, but for now [read the tests](https://github.com/kitetail/zttp/blob/master/tests/ZttpTest.php).
```php
$response = Zttp::withHeaders(['Fancy' => 'Pants'])->post($url, [
'foo' => 'bar',
'baz' => 'qux',
]);$response->status();
// int$response->isOk();
// true / false$response->json();
// => [
// 'whatever' => 'was returned',
// ];
```## Installation
`composer require kitetail/zttp`