1
在郵遞員發送憑據安裝登錄身體部分x-www-form-ulrencoded。這工作絕對好。郵差:紐曼收集亞軍無法發送身體呼叫形式URL編碼參數
在newman集合運行器中導出此腳本後,這不起作用。
以下是輸出:
-------------------------------------------------------------------------------------------
401 3361ms Login Call [POST] https://<url>/login
------------------------------------------------------------
Request headers:
{
"content-type": "application/x-www-form-urlencoded",
"host": "<url>",
"accept-encoding": "gzip, deflate",
"content-length": 0
}
Request data:
{
"userid": "user",
"password": "pswd"
}
------------------------------------------------------------
Response headers:
{
"x-frame-options": "SAMEORIGIN",
"content-type": "application/json",
"x-content-type-options": "nosniff",
"date": "...",
"cache-control": "no-cache",
"content-length": "120",
"x-xss-protection": "1; mode=block",
"connection": "close",
"accept-ranges": "bytes"
}
Response body:
{"errorCode":"401","errorMessage":"Login failed, please check the credentials","errorDescription":"API Request Failure"}
此外,當我從郵遞員生成捲曲代碼我沒有看到附着在用戶/ PSWD頭:
curl -X POST \
https://<url>/login \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \
-H 'postman-token: 5b04e538-498c-9e43-2be9-8523073260f9'
使用郵差Chrome應用:
Postman for Chrome
Version 5.0.2
win/x86-64
Chrome 59.0.3071.115
我發現的是,紐曼跨越發送到服務器之前將刪除URL編碼體的參數。任何線索? – BabyGroot