Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dominikangerer/php-easy-client

Allow GET and POST Request from Guzzle combined with the caching from APIX
https://github.com/dominikangerer/php-easy-client

apix client get guzzle php post request

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# php-easy-client
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();
```