class HttpRetryOptions
source · line 11public class HttpRetryOptions internal constructor(
/**
* Maximum retries after the initial attempt.
*/
public val maxRetries: Long = 2L,
/**
* Whether eligible connection failures may trigger retry.
*/
public val connectionFailures: Boolean = true,
methods: List<String> = ["GET", "HEAD", "PUT", "DELETE", "OPTIONS", "TRACE"],
statuses: List<UInt> = emptyList<UInt>(),
/**
* The initial backoff delay.
*/
public val initialDelay: Duration = Duration.milliseconds(100L),
/**
* The maximum selected backoff delay.
*/
public val maxDelay: Duration = Duration.seconds(30L),
/**
* Whether retry delays are randomized within the backoff policy.
*/
public val jitter: Boolean = true,
/**
* Whether a valid Retry-After response participates in delay selection.
*/
public val respectRetryAfter: Boolean = true
)
Bounded retry eligibility and cancellable backoff. Both method semantics and body replayability must permit another attempt.
Extensions
public fun HttpRetryOptions.copy(configure: HttpRetryOptionsBuilder.() -> Unit = {}): HttpRetryOptions· scoop:scoop.http.client:0.1.0
property connectionFailures
source · line 19public val connectionFailures: Boolean = true
get: public read-only
Whether eligible connection failures may trigger retry.
property jitter
source · line 33public val jitter: Boolean = true
get: public read-only
Whether retry delays are randomized within the backoff policy.
property statuses
source · line 46public val statuses: Array<UInt>
get: public read-only
Response statuses explicitly eligible for retry.
property respectRetryAfter
source · line 37public val respectRetryAfter: Boolean = true
get: public read-only
Whether a valid Retry-After response participates in delay selection.
property maxRetries
source · line 15public val maxRetries: Long = 2L
get: public read-only
Maximum retries after the initial attempt.
property maxDelay
source · line 29public val maxDelay: Duration = Duration.seconds(30L)
get: public read-only
The maximum selected backoff delay.
property initialDelay
source · line 25public val initialDelay: Duration = Duration.milliseconds(100L)
get: public read-only
The initial backoff delay.
property methods
source · line 42public val methods: Array<String>
get: public read-only
Case-sensitive methods eligible for configured retries.