diff --git a/buildSrc/src/main/kotlin/Libs.kt b/buildSrc/src/main/kotlin/Libs.kt index 362872b6e9..0765627f26 100644 --- a/buildSrc/src/main/kotlin/Libs.kt +++ b/buildSrc/src/main/kotlin/Libs.kt @@ -12,7 +12,7 @@ object Versions { const val grgit = "4.1.1" const val detekt = "1.22.0" const val dokka = "1.7.20" - const val mkdocs = "3.0.0" + const val mkdocs = "4.0.1" // With 0.13.0 ':integ-tests:transformJvmTestAtomicfu' task somehow fails const val binaryCompatibilityValidator = "0.12.1" diff --git a/elasticmagic-transport-ktor/api/elasticmagic-transport-ktor.api b/elasticmagic-transport-ktor/api/elasticmagic-transport-ktor.api index fc2230da24..b6fcbd0c53 100644 --- a/elasticmagic-transport-ktor/api/elasticmagic-transport-ktor.api +++ b/elasticmagic-transport-ktor/api/elasticmagic-transport-ktor.api @@ -1,5 +1,5 @@ public final class dev/evo/elasticmagic/transport/ElasticsearchKtorTransport : dev/evo/elasticmagic/transport/ElasticsearchTransport { - public fun (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;)V - public synthetic fun (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)V + public synthetic fun (Ljava/lang/String;Lio/ktor/client/engine/HttpClientEngine;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V } diff --git a/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt b/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt index ca9012170a..442ebd5851 100644 --- a/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt +++ b/elasticmagic-transport-ktor/src/commonMain/kotlin/dev/evo/elasticmagic/transport/ElasticsearchKtorTransport.kt @@ -1,6 +1,7 @@ package dev.evo.elasticmagic.transport import io.ktor.client.HttpClient +import io.ktor.client.HttpClientConfig import io.ktor.client.engine.HttpClientEngine import io.ktor.client.plugins.auth.Auth import io.ktor.client.plugins.auth.providers.basic @@ -21,6 +22,7 @@ import io.ktor.http.takeFrom class ElasticsearchKtorTransport( baseUrl: String, engine: HttpClientEngine, + private val customHttpClientConfig: HttpClientConfig<*>.() -> Unit = {}, configure: Config.() -> Unit = {}, ) : ElasticsearchTransport( baseUrl, @@ -29,6 +31,8 @@ class ElasticsearchKtorTransport( private val client = HttpClient(engine) { expectSuccess = false + customHttpClientConfig(this) + // Enable compressed response from Elasticsearch if (config.gzipRequests) { install(ContentEncoding) {