kitetail / zttp
A developer-experience focused HTTP client, optimized for most common use cases.
Installs: 1 138 341
Dependents: 84
Suggesters: 0
Security: 0
Stars: 1 674
Watchers: 30
Forks: 119
Open Issues: 16
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^6.0
- tightenco/collect: ^5.4
Requires (Dev)
- laravel/lumen-framework: 5.5.*
- phpunit/phpunit: ^6.0
README
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