我有以下命令,在Linux上可以正常工作,但在Windows上却不能。我找不到任何关于curl语法在Windows上的文档。我尝试了双引号...但还是无效。有人能帮我调整这个命令吗,以便我可以在Windows上使用它 (我已经安装了c盘中的curl.exe)。
curl -X POST -H "Content-Type: application/json" -H "X-Cachet-Token: secret" http://somegoodserver/api/v1/incidents -d '{"name":"Test","message":"Test message","status":"1"}'
我得到的错误是:
"status":400,"title":"Bad Request","detail":"The request cannot be fulfilled due to bad syntax.","meta": {"details":["The name format is invalid.","The status format is invalid.","The message format is invalid."]}}]}