Hi. I'm facing an issue when using an `HttpClient`...
# ktor
f
Hi. I'm facing an issue when using an
HttpClient
on the
node
target (
Js
engine), where the cookies are not being sent, even when installing the
HttpCookies
on the client. The same multiplatform code does send the cookies when ran on the
jvm
target. Are there any known limitations on using client-side cookies in node?
e
Hey! In some cases the HttpCookie header is not present in the response. Could you log an issue? I will take a look
f
Hi. • So the
set-cookie
may not be present in the response object even if present in present in the response of the server? • I've installed a custom storage and added breakpoints to
get
and
addCookie
. I can see the
get
being called but not the
addCookie
method. • Where should I create the issue?
Probably it is important to refer that on my scenario the
set-cookie
is present on redirect responses. Are redirects being handled automatically by the Js engine, without the response being processed by the ktor pipeline?
node-fetch
probably is handling the redirects automatically (at least that is the documented
fetch
behaviour), which means the tor pipeline never sees the response with the
set-cookie
. Does this make sense? Is there any way to control the
fetch
options object?
Yep, that was it. If I set
followRedirects = false
, then it works.
👏 1
e
Awesome, could you log an issue for that?
f
e
Thanks!