I would like to get a cookie after logging into an app where I don’t have an api, just a login form.
Using Postman or Insomnia I can login and get the cookie successfully, I really tried it in every way, of course I’m using node Http Requests, read in other questions that say to enable the Full Response option to true, but not yet I can choose the cookie in the headers.
My goal is to use the cookie to perform an update on the next node.
N8n is very nice, congratulation the community. I am appreciation.
When I set the redirect false I can get the cookie but as it gives the error “object moved” due to the app redirecting to the dashboard after login I can’t run the workflow.
Apart from the cookie, do you need anything else in the next nodes of your workflow? Since this HTTP Request node is not giving an error, it is simply returning the body of the webpage, the next node in your workflow should get executed.
Follow all redirects is set to false, my workflow doesn’t work, but I can see the cookie is in the headers, but I can’t get it next node, because the workflow stops.
Thank you for sharing the information. With the previous screenshot, I thought you were getting a successful output. I am not sure how this can be handled. Can you share the workflow via DM? It will help me replicate the issue
Thank you for your help.
Now I can run my workflow by setting Ignore Response to true.
When I get the object moved error the workflow runs successfully.
That must have to do with our switch from the request library to axios as the former got deprecated.
We will check what is going on there exactly and try to release a fix with the next version.
If you want to use 0.139.1 you can temporarily also set the environment variable N8N_USE_DEPRECATED_REQUEST_LIB=true to keep on using the request library also in this new version till it got fixed.
Thanks for reporting this, @mast_ats. @krynble is the man for this and he’s out until Monday, but he’ll help get to the bottom of this as soon as he can.
I’m on 0.145.0 and had this problem. The request node was just retuning an empty json response, no response headers at all.
I set the N8N_USE_DEPRECATED_REQUEST_LIB=true and it works now.
Unfortunately I can’t provide more details I have none really, but will gladly provide any info necessary to replicate the problem (Just not the entire workflow)
Can you provide more details? The scenario that I fixed and works fine is:
Turn on Full Response on HTTP Request node
Turn on Ignore Response on HTTP Request node
Disable Follow all redirects on HTTP Request node
I created a mock where a fake endpoint returns a Set-cookie header along with Location header and a status code of 301 or 302. For both situations, this worked fine. The redirect was not made and the http request node returned the headers correctly.
Could you please also check these settings @Couto ?
@krynble The settings you mentioned were my initial settings when the request was failing to return the response body.
However, in my scenario, the server returns a 303 response status.