【发布时间】:2017-04-25 11:36:22
【问题描述】:
curl -v -X POST "ipaddress" -H 'Content-Type: application/octet-stream' -k --data-binary '@Test.png' -H 'Authorization: token'
在 git-bash 上运行上述命令时,它运行成功
但是在安装了 curl 的窗口命令行上运行时,相同的命令会失败并显示以下错误:
upload completely sent off: 14 out of 14 b
HTTP/1.1 400 Bad Request
X-Content-Type-Options: nosniff
【问题讨论】:
-
可能是 CURL 的 windows 版本不支持您提供的确切参数,而 git-bash 的版本支持。
标签: web-services curl post odata