retryOnExceptionOrServerErrors

fun retryOnExceptionOrServerErrors(maxRetries: Int = -1)

Enables retrying a request if an exception is thrown during the HttpSend phase or a 5xx response is received and specifies the number of retries.