kohttp / io.github.rybalkinsd.kohttp.interceptors / RetryInterceptor / <init>

<init>

RetryInterceptor(failureThreshold: Int = 3, invocationTimeout: Long = 0, ratio: Int = 1, errorStatuses: List<Int> = listOf(503, 504))

Retry Interceptor

Retry request if you get an exception or an error code.

Parameters

failureThreshold - number of attempts to get response with default value 3

invocationTimeout - timeout (millisecond) before retry

ratio - ratio for exponential increase of invocation timeout

errorStatuses - error codes that you need to handle with default values 503,504

Since
0.9.0

Author
UDarya