關於postman前置腳本的詳細介紹: https://learning.getpostman.com/docs/postman/scripts/pre_request_scripts/
環境變量是key 、value 鍵值對,在api path上可以通過key引用變量,形式是{{key}}
pre-request script 前置腳本,每次發送http請求前,都會調用該腳本。
http的cookie是存儲在headers中的,可以通過腳本引用變量的。
1、使用變量設置cookie內容
2、使用腳本自動注入cookie
https://github.com/postmanlabs/postman-app-support/issues/4631
3、自動同步Chrome瀏覽器的cookie
https://learning.getpostman.com/docs/postman/sending_api_requests/interceptor_extension/
https://learning.getpostman.com/docs/postman/scripts/postman_sandbox/