This has been asked previously but all posts are 4-5 years old - I'm REALLY hoping this is a possible now.
I'm trying to pass cookies returned on one HTTP action into another - is this possible and what would that process look like?
The idea is - the first POST HTTP is creating an Authorization token - this needs passed as cookies to the second GET HTTP which will then pull the data I actually need.
I have the integration working perfectly in Postman. I tried to import it and it failed so I'm rebuilding it with HTTP actions.
Any help or guidance would be DEEPLY appreciated!
I'm having the same issue with staying logged in for the HTTP GET request and have been researching a lot. Have you tried passing your unique session ID into the 'Cookie' section of your second HTTP action (I believe it needs to be passed in a form such as 'JSESSIONID=dhjasdhkasdhjaskjhdaskh.app-02'). Also, if your token expires you'll have to store it in a variable dynamically and input it wherever your API documentation says is valid to do so. If you figure this out please keep me updated, I am struggling heavily with this as well; there's really no good documentation on this that I have found.
How exactly would I pass the Cookie into the next HTTP(Or Extract it as a variable)? That's where I'm struggling - I "think" I need to use Parse JSON but I don't know how to direct it at the cookie returned from the initial HTTP request
You can either use Parse JSON or you can use multiple split methods if you want a specific value from the set-cookie.
outputs('HTTP')['Headers']['Set-Cookie'] will bring back your entire set cookie.
User | Count |
---|---|
103 | |
36 | |
29 | |
25 | |
16 |
User | Count |
---|---|
136 | |
54 | |
52 | |
36 | |
26 |