retryDelayMillis

open override fun retryDelayMillis(attempt: Int, method: HttpMethod, error: NetworkError): Long?

The delay before the upcoming retry, or null to give up.

Parameters

attempt

the 1-based number of the retry being considered (1 = first retry).

method

the request's HTTP method (e.g. to avoid retrying non-idempotent calls).

error

the failure from the previous attempt; a NetworkError.ServerError carries the status code and any parsed Retry-After hint.