Need help running curl from atom-shell-commands


#1

I am new to Atom (migrating from Notepad++) and trying to post a file using curl from my Windows env. When I use an argument of “–data-binary @{FileName}”, I receive the error:

curl: option --data-binary @new1.js: is unknown
curl: try ‘curl --help’ or ‘curl --manual’ for more information

The curl command works fine from the command line. I have even compared curl versions from command line and Atom (both are 7.46.0)

Any thoughts?


#2

Interesting, I just passed “–data-binary” with no file reference and received the following error:

curl: option --data-binary: requires parameter

making progress…


#3

solution: The arguments have to be on different lines:

      "--data-binary"
      "@{FileName}"

I also found that you shouldn’t have spaces in the header:

works:
"-HAccept: text/csv"

doesn’t work:

      "-H Accept: text/csv"