How can I retrieve the cookies returned by the server I call out to with request?
You can use your own jar and then read them, i.e.
var jar = request.jar();
I'm getting undefined when I do jar.cookies
you could take a look at the response's headers for Cookie res.headers i believe. Alternatively you could use jar.getCookieString(YOUR_URL_HERE)
this is how I retrieve cookies: receiveCookie = response.headers['set-cookie'][x]
then I use cookie = toughCookie.Cookie.parse(receiveCookie)
and jar.setCookie(cookie ....
this works form me :)
thanks. i think jar.setCookie will take the original receiveCookie though? or am i wrong about that.
yes, but I need to parse "receiveCookie" in other to get things work ... this is the solution I found
Is this still an issue?
This is so old I'm closing, if it is actually still an issue just let me know and I'll re-open.