retry
fun retry(statusCodes: Set<HttpStatusCode> = network.retryStatusCodes, maxRetries: Int = network.maxRetries, onlyIdempotent: Boolean = network.retryOnlyIdempotent): ZetaHttpClientBuilder
Configure automatic retry behavior for responses with specific HTTP status codes.
Return
This builder for chaining.
Parameters
status Codes
Set of HTTP status codes that should trigger a retry. Defaults to the current value in NetworkConfig.
max Retries
Maximum number of retry attempts (excluding the initial attempt). Defaults to the current value in NetworkConfig.
only Idempotent
When true, retries are limited to idempotent HTTP methods (e.g., GET/HEAD/PUT/DELETE). Semantics depend on the underlying client.