on 06-22-2021 8:28 AM
Hello there,
I would like to store the cookie data from external API connection in a variable, for further use. I cannot access those properties from either the header or the body.
Is there a possible way to store cookies comes from the API?
Hi Bekirhan,
the cookie is typically returned in the "set-cookie" header. By enabling the "Include headers" checkbox in the "Response" tab of an API service configuration you can make the headers available in the {{api_service_response}} variable. Be aware that the "set-cookie" header might contain an array when multiple cookies are returned, so you could access it for example like this:
{{api_service_response.default.headers.set-cookie.0}}
Regards
Jonas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
65 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.