我已經將JSON文件導入到郵遞員中,並且JSON正文正在爲特定參數請求授權承載者值。如何爲參數設置一個值。目前它的未定義。請參閱下面的JSON代碼和圖像。如何在PostMan中指定訪問令牌
"name": "Pos_TC-Name", "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "tests[\"Status code is 200\"] = responseCode.code === 200;" ] } } ], "request": { "url": " http://localhost:52586/api/Patient/7 ", "method": "GET", "header": [ { "key": "Content-Type", "value": "application/json", "description": "" }, { "key": "Authorization", "value": "Bearer {{NurseAdminToken}}", "description": "" } ], "body": { "mode": "raw", "raw": "" }, "description": "" }, "response": [] },
你必須在''Manage Environment''下面定義變量''global''點擊窗口右上角的「Setting Wheel」。 – Achilles