[英]Why does the postman post request not send body variables?
這兩個示例不等效,因為使用 Postman 您有Content-Type: text/plain
header 設置,但通過curl -d
選項發送數據,設置Content-Type: application/x-www-form-urlencoded
來自curl
手冊頁:
-d, --data <data>
(HTTP MQTT) Sends the specified data in a POST request to the
HTTP server, in the same way that a browser does when a user has
filled in an HTML form and presses the submit button. This will
cause curl to pass the data to the server using the content-type
application/x-www-form-urlencoded.
我對 Postman 沒有任何經驗,但我猜你需要 select x-www-form-urlencoded
按鈕而不是當前的raw
按鈕。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.