Get and store the value of a cookie using Postman [closed]

You could use the pm.environment.set('my_cookie', pm.cookies.get('JSESSIONID')) function in the Tests tab and store it as an environment variable.

This can then be used in the next Request Body (If chaining them together) or in any Request Body or Request Header by referencing the value using the {{my_cookie}} syntax.

A very similar issue can be found here.

Leave a Comment