I'm encountering an issue trying to make a ktor-cl...
# ktor
d
I'm encountering an issue trying to make a ktor-client request with some cookies. Using the
cookie()
method url encodes the cookie data for some reason which makes the data invalid, and trying to set the Cookie header directly seems to have no effect on the request based on what the logs are showing me (I don't see a Cookie header after setting it). Ktor version is 3.2.1
a
You can send the
Cookie
header manually to avoid the encoding.
d
Unfortunately
append("Cookie", "...")
seems to have no impact on the network request based on the logs. I only see cookie headers logs when I set them via the
cookie()
method.
(and the API endpoint acts as though they aren't set)
a
Can you share the complete code snippet?
d
Not easily since it's on another computer. Other headers being set in the same block are showing up in the logs.
This is with the CIO engine on the JVM