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

When running above command on git-bash it runs successfully

But when run on window command line having curl installed, same command gets failed and shows the below error:

upload completely sent off: 14 out of 14 b
HTTP/1.1 400 Bad Request
X-Content-Type-Options: nosniff
1
  • Could be the windows version of CURL doesn't support the exact arguments you're supplying, whereas git-bash's version does. Commented Apr 25, 2017 at 12:03

1 Answer 1

5

Replace your single quote with double quote. Windows cmd doesn't work with single. For example:

curl -v -X POST "ipaddress" -H "Content-Type: application/octet-stream" -k --data-binary "@Test.png" -H "Authorization: token"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.