Postman script by setting a cookie request

 

For more information about postman pre-script:  https://learning.getpostman.com/docs/postman/scripts/pre_request_scripts/

Environment variables are key, value key-value pair in the api path can be referenced through a variable key, the form {{key}}

pre-request script pre-script, each time before sending http request will invoke the script.

http cookie is stored in the headers of the, variables can be referenced by the script.

 

 

1, using variables to set a cookie content

https://stackoverflow.com/questions/43471751/postman-setting-a-cookie-from-a-global-variable-with-tests-code

 

2, using a script automatically injected cookie

https://github.com/postmanlabs/postman-app-support/issues/4631

 

3, automatic synchronization of browser Chrome cookie

https://learning.getpostman.com/docs/postman/sending_api_requests/interceptor_extension/

https://learning.getpostman.com/docs/postman/scripts/postman_sandbox/

Guess you like

Origin www.cnblogs.com/afraidToForget/p/11466418.html
Recommended