retryIf
fun retryIf(maxRetries: Int = -1, block: HttpRetryShouldRetryContext.(HttpRequest, HttpResponse) -> Boolean)
Specifies retry logic for a response. The block accepts HttpRequest and HttpResponse and should return true
if this request should be retried.
Function that determines whether a request should be retried based on the response.