Web services 在安装了Curl的windowcmd上运行Curl时,Curl不起作用,但在git bash上使用相同的命令

Web services 在安装了Curl的windowcmd上运行Curl时,Curl不起作用,但在git bash上使用相同的命令,web-services,curl,post,odata,Web Services,Curl,Post,Odata,在gitbash上运行上述命令时,它会成功运行 但在安装了curl的窗口命令行上运行时,同一命令失败,并显示以下错误: curl -v -X POST "ipaddress" -H 'Content-Type: application/octet-stream' -k --data-binary '@Test.png' -H 'Authorization: token' 用双引号替换单引号。Windows cmd不适用于单个。例如: upload completely sent off: 14

在gitbash上运行上述命令时,它会成功运行

但在安装了curl的窗口命令行上运行时,同一命令失败,并显示以下错误:

curl -v -X POST "ipaddress" -H 'Content-Type: application/octet-stream' -k --data-binary '@Test.png' -H 'Authorization: token'

用双引号替换单引号。Windows cmd不适用于单个。例如:

upload completely sent off: 14 out of 14 b
HTTP/1.1 400 Bad Request
X-Content-Type-Options: nosniff

用双引号替换单引号。Windows cmd不适用于单个。例如:

upload completely sent off: 14 out of 14 b
HTTP/1.1 400 Bad Request
X-Content-Type-Options: nosniff

可能是windows版本的CURL不支持您提供的确切参数,而git bash版本支持。可能是windows版本的CURL不支持您提供的确切参数,而git bash版本支持。