RetryWhen

typealias RetryWhen = suspend (request: Request, response: Response, attempt: Int) -> Boolean

Type alias for a function that determines when to retry a request.

Return

A Boolean value indicating whether to retry the request. Return true to retry, false otherwise.

Parameters

request

The original request that was made.

response

The response that was received from the request.

attempt

The current attempt number.