RetryStrategyInterface
in
Tags
Table of Contents
Methods
- getDelay() : int
- Returns the time to wait in milliseconds.
- shouldRetry() : bool|null
- Returns whether the request should be retried.
Methods
getDelay()
Returns the time to wait in milliseconds.
public
getDelay(AsyncContext $context, string|null $responseContent, TransportExceptionInterface|null $exception) : int
Parameters
- $context : AsyncContext
- $responseContent : string|null
- $exception : TransportExceptionInterface|null
Return values
intshouldRetry()
Returns whether the request should be retried.
public
shouldRetry(AsyncContext $context, string|null $responseContent, TransportExceptionInterface|null $exception) : bool|null
Parameters
- $context : AsyncContext
- $responseContent : string|null
-
Null is passed when the body did not arrive yet
- $exception : TransportExceptionInterface|null
Return values
bool|null —Returns null to signal that the body is required to take a decision