Hello everyone! Please tell me, how can I set the value for the “ufs-session” cookie from the global parameter? I triUploading: 1.png… ed different syntax, but in the response I see that the cookies are not set
You can programmatically set cookies in a pre-request script. See here for a quick example on setting a cookie value to a variable value:
const jar = pm.cookies.jar(); jar.set('https://postman-echo.com', 'ufs-session', pm.variables.get('cookie'));
In order to make this work, the domain needs to be whitelisted by the Cookie Manager:
To whitelist a domain so that cookies can be programmatically accessed, click the Cookies link under the Send button and open the MANAGE COOKIES modal. Click on Whitelist Domains from bottom left and enter the list of domains needed to be whitelisted.
Hope this helps.
Thank you, Kevin. I will try