g4/gateway

gateway php library

Installs: 67 641

Dependents: 2

Suggesters: 0

Security: 0

Stars: 1

Watchers: 11

Forks: 7

Open Issues: 0

pkg:composer/g4/gateway

3.3.0 2025-09-26 09:26 UTC

README

gateway - php library

Install

Via Composer

composer require g4/gateway

Usage

use G4\Gateway\Options;
use G4\Gateway\Http;

$options = new Options();
$options
    ->addHeader('Accept', 'application/json')   // optional
    ->setTimeout(30)                            // optional
    ->setSslVerifyPeer(true);                   // optional
    
$http = new Http('http://api.url', $options)
$http
    ->setServiceName('maps');                   // optional

$response = $http->get(['id' => 123]);          // post(), put(), delete()

echo $response->getCode();
echo $response->getBody();

Development

Install dependencies

$ make install

Run tests

$ make unit-tests

License

(The MIT License) see LICENSE file for details...