mindfulindustries / php-http-transport
Simple PHP Guzzle wrapper.
Installs: 431
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/mindfulindustries/php-http-transport
Requires
- php: >=7.2
- guzzlehttp/guzzle: ^6.0
Requires (Dev)
README
Simple PHP Guzzle wrapper inspired by Zttp.
Installation
composer require mindfulindustries/php-http-transport
Usage without timeout
$response = \MindfulIndustries\Support\Transport\Http::get('http://example.com', [ 'foo' => 'bar' ]);
Usage with timeout
try { $response = \MindfulIndustries\Support\Transport\Http::timeout(5)->post('http://your.domain', [ 'foo' => 'bar' ]); } catch (\MindfulIndustries\Support\Transport\ConnectionException $e) { // timed out .. }