soyhuce/zttp

This package is abandoned and no longer maintained. The author suggests using the illuminate/http package instead.

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

Maintainers

Details

github.com/Soyhuce/zttp

Source

Installs: 3 007

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 107

0.6.0 2019-10-18 13:26 UTC

This package is auto-updated.

Last update: 2020-05-11 15:05:56 UTC


README

** This package is archived in favor of illuminate/http or the original kitetail/zttp **

Important disclaimer :

This package is a fork of kitetail/zttp for those who love PSR-2 and type-hinting. All credit must go to its authors, they did an amazing work.

Feel free to contribute and integrate changes from original repository to this one.

end of disclaimer

Intallation

Simply run composer require soyhuce/zttp. That's all.

Documentation

From kitetail/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 :)

Real documentation is in the works, but for now read the tests.

$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