A (very) simple guzzle PSR-18 adapter.
- PHP ^7.1 (Due to PSR-18 interface using Return Type Declaration)
- Guzzle ^6.3
Via Composer
$ composer require ricardofiorani/guzzle-psr18-adapter
$client = new \RicardoFiorani\GuzzlePsr18Adapter\Client();
$request = new \Your\Implementation\Of\Psr7\Request();
try {
echo $client->sendRequest($request);
} catch (\Psr\Http\Client\ClientExceptionInterface $exception) {
// your error handling
}
For futher documentation please see http://docs.guzzlephp.org/en/stable/
$ composer test