Package-level declarations

Configuration classes for customizing client behavior including RequestOptions, RetryStrategy, LoggingConfig, and ProxyConfig.

Types

Link copied to clipboard

Circuit breaker state machine.

Link copied to clipboard
data class CircuitBreakerConfig(val failureThreshold: Int = 5, val resetTimeout: Duration = 30.seconds)

Circuit breaker that stops retries when failures exceed a threshold.

Link copied to clipboard
data class LoggingConfig(val logLevel: LogLevel = LogLevel.Headers, val logger: HttpLogger = HttpLogger.SIMPLE, val sanitize: Boolean = true)

Configuration for HTTP client logging.

Link copied to clipboard
data class OAuthConfig(val accessToken: String, val refreshToken: String, val clientId: String, val clientSecret: String, val tokenUrl: String = TOKEN_URL, val onTokensRefreshed: (accessToken: String, refreshToken: String) -> Unit? = null)

OAuth2 authentication configuration for the Volvo ID identity system.

Link copied to clipboard
class Pkce

PKCE (Proof Key for Code Exchange) parameters for the OAuth2 authorization code flow.

Link copied to clipboard
sealed interface ProxyConfig

Proxy configuration for HTTP client.

Link copied to clipboard
data class RequestOptions(val headers: Map<String, String> = emptyMap(), val urlParameters: Map<String, String> = emptyMap(), val timeout: Timeout? = null)

Represents options for configuring a request to an endpoint.

Link copied to clipboard
data class RetryStrategy(val maxRetries: Int = 3, val base: Double = 2.0, val maxDelay: Duration = 60.seconds, val retryOnStatusCodes: Set<Int> = setOf(429, 502, 503, 504))

Specifies the retry strategy for failed requests.

Link copied to clipboard

Generates a W3C Trace Context traceparent header value.