diff --git a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt index af760fec..6ee4ecf9 100644 --- a/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt +++ b/lithic-kotlin-core/src/main/kotlin/com/lithic/api/core/ClientOptions.kt @@ -11,6 +11,7 @@ import java.time.Clock class ClientOptions private constructor( + private val originalHttpClient: HttpClient, val httpClient: HttpClient, val jsonMapper: JsonMapper, val clock: Clock, @@ -50,7 +51,7 @@ private constructor( private var webhookSecret: String? = null internal fun from(clientOptions: ClientOptions) = apply { - httpClient = clientOptions.httpClient + httpClient = clientOptions.originalHttpClient jsonMapper = clientOptions.jsonMapper clock = clientOptions.clock baseUrl = clientOptions.baseUrl @@ -150,6 +151,7 @@ private constructor( this.queryParams.forEach(queryParams::replaceValues) return ClientOptions( + httpClient!!, RetryingHttpClient.builder() .httpClient(httpClient!!) .clock(clock)