$nextHandler
$nextHandler : callable
Middleware that retries requests based on the boolean result of invoking the provided "decider" function.
__construct(callable $decider, callable $nextHandler, callable $delay = null)
callable | $decider | Function that accepts the number of retries, a request, [response], and [exception] and returns true if the request is to be retried. |
callable | $nextHandler | Next handler to invoke. |
callable | $delay | Function that accepts the number of retries and [response] and returns the number of milliseconds to delay. |
__invoke(\Psr\Http\Message\RequestInterface $request, array $options) : \GuzzleHttp\Promise\PromiseInterface
\Psr\Http\Message\RequestInterface | $request | |
array | $options |
onFulfilled(\Psr\Http\Message\RequestInterface $req, array $options)
\Psr\Http\Message\RequestInterface | $req | |
array | $options |
onRejected(\Psr\Http\Message\RequestInterface $req, array $options)
\Psr\Http\Message\RequestInterface | $req | |
array | $options |
doRetry(\Psr\Http\Message\RequestInterface $request, array $options, \Psr\Http\Message\ResponseInterface $response = null)
\Psr\Http\Message\RequestInterface | $request | |
array | $options | |
\Psr\Http\Message\ResponseInterface | $response |