dominikangerer/php-easy-client

DominikAngerer - Client to easily fetch and cache data

Installs: 89

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/dominikangerer/php-easy-client

v1.0.3 2017-02-15 10:19 UTC

This package is not auto-updated.

Last update: 2025-10-20 20:24:15 UTC


README

Allow GET and POST Request from Guzzle combined with the caching from APIX

Install

composer require dominikangerer/php-easy-client

How to use

// initialize with domain
$client = new \DominikAngerer\Client('https://raw.githubusercontent.com');

// Optionally set a cache
$client->setCache('filesytem', array('path' => 'cache'));

// execute a get Request and get the Body
$client->get('/DominikAngerer/default-datasources/master/country-iso2.json', array('time' => time()));
$data = $client->getBody();

// access the headers
$headers = $client->getHeaders();