mindfulindustries/php-http-transport

Simple PHP Guzzle wrapper.

v2.1.1 2019-09-20 17:21 UTC

This package is auto-updated.

Last update: 2021-02-21 12:41:21 UTC


README

Simple PHP Guzzle wrapper inspired by Zttp.

Build Status

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 ..
}