retryOnExceptionIf
fun retryOnExceptionIf(maxRetries: Int = -1, block: HttpRetryShouldRetryContext.(HttpRequestBuilder, Throwable) -> Boolean)
Specifies retry logic for failed requests. The block accepts HttpRequestBuilder and Throwable and should return true if this request should be retried.