interface RetryStrategyInterface

Methods

bool|null
shouldRetry(AsyncContext$context,string|null$responseContent,TransportExceptionInterface|null$exception)

Returns whether the request should be retried.

int
getDelay(AsyncContext$context,string|null$responseContent,TransportExceptionInterface|null$exception)

Returns the time to wait in milliseconds.

Details

bool|null shouldRetry(AsyncContext$context,string|null$responseContent,TransportExceptionInterface|null$exception)

Returns whether the request should be retried.

Parameters

AsyncContext $context
string|null $responseContent
TransportExceptionInterface|null $exception

Return Value

bool|null Returns null to signal that the body is required to take a decision

int getDelay(AsyncContext$context,string|null$responseContent,TransportExceptionInterface|null$exception)

Returns the time to wait in milliseconds.

Parameters

AsyncContext $context
string|null $responseContent
TransportExceptionInterface|null $exception

Return Value

int