Scoop API

scoop:scoop.http.client:0.1.0

HttpRetryOptions

class HttpRetryOptions

source · line 11
public
public 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

property connectionFailures

source · line 19
public
public val connectionFailures: Boolean = true

get: public read-only

Whether eligible connection failures may trigger retry.

property jitter

source · line 33
public
public val jitter: Boolean = true

get: public read-only

Whether retry delays are randomized within the backoff policy.

property statuses

source · line 46
public
public val statuses: Array<UInt>

get: public read-only

Response statuses explicitly eligible for retry.

property respectRetryAfter

source · line 37
public
public val respectRetryAfter: Boolean = true

get: public read-only

Whether a valid Retry-After response participates in delay selection.

property maxRetries

source · line 15
public
public val maxRetries: Long = 2L

get: public read-only

Maximum retries after the initial attempt.

property methods

source · line 42
public
public val methods: Array<String>

get: public read-only

Case-sensitive methods eligible for configured retries.