Class GuzzleHandler
A request handler that sends PSR-7-compatible requests with Guzzle 5.
The handler accepts a PSR-7 Request object and an array of transfer options and returns a Guzzle 6 Promise. The promise is either resolved with a PSR-7 Response object or rejected with an array of error data.
Methods Summary
Methods Details
__construct ( GuzzleHttp\ClientInterface $client = null )
Parameters
GuzzleHttp\ClientInterface | $client = null |
GuzzleHttp\Promise\Promise
|GuzzleHttp\Promise\PromiseInterface
__invoke (
Psr\Http\Message\RequestInterface
$request,
array
$options = []
)
Parameters
Psr\Http\Message\RequestInterface |
$request | |
array | $options = [] |
Returns
GuzzleHttp\Promise\Promise |GuzzleHttp\Promise\PromiseInterface |
Exceptions
GuzzleHttp\Exception\GuzzleException |