163






Postman https://www.postman.com 平台提供各式服務比如API Tools, API Repository, Workspaces, Governance幫助有效的縮短並優化API開發與測試進程。
如何設定Postman的variables呢?
以下步驟示範將https://postman-echo.com設為變數address,針對重複使用的變數例如id等設為變數後,後續request就可以快速複用。
設定variable
1.選取request裡的https://postman-echo.com,出現提示可以設為變數(Set as variable)

2.點擊「+」設定新變數(Set as a new variable)

3.輸入Name, Value, 選擇Scope後點擊Set variable
此處Name使用address為範例,value預設為選取的字段,Scope可以選擇Global, Collection, 或Environment


4.設定完成自動變為參數( {{address}}/get ),可點擊Send執行
修改variable
如何修改variable?
1.Scope若設為collection,則可在collection的「更多 – Edit」選項找到該variable

2.在Variable 分頁可以看到目前設定的variable

更多請參考