Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kitetail/zttp

A developer-experience focused HTTP client, optimized for most common use cases.
https://github.com/kitetail/zttp

Last synced: about 2 months ago
JSON representation

A developer-experience focused HTTP client, optimized for most common use cases.

Awesome Lists containing this project

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`