Felipsmartins is correct.
It should be noted that this is because you cannot use the -d / - data option unless it is a POST request. But this is possible if you use the -G option.
This means you can do this:
curl -X DELETE -G 'http://localhost:5000/locations' -d 'id=3'
This is a little silly here, but when you are on the command line and you have a lot of options, it is much more complicated.
I say this because cURL commands are usually quite long, so you should do this on multiple lines, avoiding line breaks.
curl -X DELETE -G \ 'http://localhost:5000/locations' \ -d id=3 \ -d name=Mario \ -d surname=Bros
This is obviously much more convenient if you are using zsh. I mean, when you need to edit the previous command, because zsh allows you to go line by line. (just saying)
Hope this helps.
Mig Jan 11 '13 at 18:34 2013-01-11 18:34
source share