Federico Tomassetti
02/09/2024, 2:59 PMimplementation("io.ktor:ktor-client-encoding:$ktorVersion") // ktorVersion=2.3.8
I configured compression in my client:
private val client = HttpClient(CIO){
install(ContentEncoding) {
deflate(1.0F)
gzip(0.9F)
}
}
However I cannot import the compress
extension method presented here: https://api.ktor.io/ktor-client/ktor-client-plugins/ktor-client-encoding/io.ktor.client.plugins.compression/compress.html
Do you have any idea why is this the case?Aleksei Tirman [JB]
02/09/2024, 3:57 PMHttpRequestBuilder.compress
has been introduced in Ktor 3.0.0-beta-1
, so Ktor 2.3.8
doesn't have it. For some reason this method is included in the Ktor 2.3.8 API documentation.Federico Tomassetti
02/09/2024, 3:58 PM