\GuzzleHttpRetryMiddleware

Middleware that retries requests based on the boolean result of invoking the provided "decider" function.

Summary

Methods
Properties
Constants
__construct()
exponentialDelay()
__invoke()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
onFulfilled()
onRejected()
doRetry()
$nextHandler
$decider
$delay
N/A

Properties

$nextHandler

$nextHandler : callable

Type

callable

$decider

$decider : callable

Type

callable

$delay

$delay : callable

Type

callable

Methods

__construct()

__construct(callable  $decider, callable  $nextHandler, callable  $delay = null) 

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 [response] and returns the number of milliseconds to delay.

exponentialDelay()

exponentialDelay(integer  $retries) : integer

Default exponential backoff delay function.

Parameters

integer $retries

Returns

integer