我查看了有關此主題的所有先前答案,但無法讓我的 POST 請求在 cURL 視窗中作業,盡管它在 PostMan 中完美運行。我使用 </> 匯出了代碼并嘗試了幾種匯出引數的組合......任何幫助將不勝感激!
這是我的卷曲代碼:
curl -L -X POST "https://timingserver.net/api/bridge/generic" -H "cache-control: no-cache" -H "connection: close" -H "content-type: application/json" --data-raw "{
\"username\":\"myusername\",
\"password\":\"mypassword\",
\"event\":\"demo\",
\"checkpoint\":12,
\"detections\":[{\"bib\":100, \"dt\":\"2022-01-12T13:09:23.045\"},
{\"bib\":101, \"dt\":\"2022-01-12T13:09:23.045\"},
{\"bib\":102, \"dt\":\"2022-01-12T13:09:23.045\"},
{\"bib\":199, \"dt\":\"2022-01-12T13:10:23.045\"}]
}"
在同一執行中出現多個錯誤:代碼 400,無法識別為內部或外部命令...找不到指定的路徑...
uj5u.com熱心網友回復:
您需要洗掉換行符:
curl -L -X POST "https://timingserver.net/api/bridge/generic" -H "cache-control: no-cache" -H "connection: close" -H "content-type: application/json" --data-raw "{ \"username\":\"myusername\", \"password\":\"mypassword\", \"event\":\"demo\", \"checkpoint\":12, \"detections\":[{\"bib\":100, \"dt\":\"2022-01-12T13:09:23.045\"}, {\"bib\":101, \"dt\":\"2022-01-12T13:09:23.045\"}, {\"bib\":102, \"dt\":\"2022-01-12T13:09:23.045\"}, {\"bib\":199, \"dt\":\"2022-01-12T13:10:23.045\"}] }"
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/489588.html
上一篇:沒有證書授權的mTLS
