Ignacio
Ignacio

Reputation: 7938

pushover + curl --form-string: is badly used

I'm trying to use pushover and getting the following error:

$ /usr/bin/curl -s \
  --form-string "token=mysecrettoken" \
  --form-string "user=mysecret user" \
  --form-string "hola!" \
  https://api.pushover.net/1/messages.json

curl: option --form-string: is badly used here
curl: try 'curl --help' or 'curl --manual' for more information

What am I doing wrong?

curl --version                                       
curl 7.47.0 (x86_64-pc-linux-gnu)

Upvotes: 2

Views: 4459

Answers (1)

Matt Clark
Matt Clark

Reputation: 28629

If you read the manual, the usage of the --form-string method is as follows:

--form-string <name=string>

Your error is generated on:

--form-string "hola!"

As it does not include the value for the key; simply adding an = causes this error to go away, as it turns it into a key/value pair.

--form-string "hola!="

Upvotes: 5

Related Questions