public function RetryMiddleware::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/guzzle/src/RetryMiddleware.php \GuzzleHttp\RetryMiddleware::__construct()
Parameters
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 returns the number of milliseconds to delay.
File
- vendor/
guzzlehttp/ guzzle/ src/ RetryMiddleware.php, line 31
Class
- RetryMiddleware
- Middleware that retries requests based on the boolean result of invoking the provided "decider" function.
Namespace
GuzzleHttpCode
public function __construct(callable $decider, callable $nextHandler, callable $delay = null) {
$this->decider = $decider;
$this->nextHandler = $nextHandler;
$this->delay = $delay ?: __CLASS__ . '::exponentialDelay';
}