https://kotlinlang.org logo
#ktor
Title
# ktor
a

aleksey.tomin

10/27/2020, 5:10 AM
How can I use gzip for ktor-client POST requests (not response)? ktolin 1.4.10, ktor 1.4.1, native/curl I’ve added
Copy code
ContentEncoding {
            gzip()
        }
But the server team says that request body not in gzip.
a

Aleksei Tirman [JB]

10/28/2020, 7:37 AM
You can use
ContentEncoding
feature only for decoding received response. To solve your problem you can manually compress POST body and send it.
a

aleksey.tomin

10/28/2020, 7:41 AM
It not usable for native 😞
a

Aleksei Tirman [JB]

10/28/2020, 7:54 AM
I've created a feature request.
a

aleksey.tomin

10/28/2020, 7:59 AM
Thank you!
320 Views