ricardofiorani/guzzle-psr18-adapter
Tiny adapter that lets you use Guzzle as a PSR-18 HTTP client. Bridges PSR-7 requests/responses and promises to the PSR-18 ClientInterface, easing migration to standards-based HTTP without rewriting existing Guzzle integrations.
A (very) simple guzzle PSR-18 adapter.
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
How can I help you explore Laravel packages today?