darksky darksky - 1 year ago 215
HTTP Question

CURL Command Line URL Parameters

I am trying to send a

request with a url parameter using CURL. I am doing:

curl -H application/x-www-form-urlencoded -X DELETE http://localhost:5000/locations` -d 'id=3'

However, the server is not seeing the parameter id = 3. I tried using some GUI application and when I pass the url as:
, it works. I really would rather use CURL rather than this GUI application. Can anyone please point out what I'm doing wrong?

Answer Source

"application/x-www-form-urlencoded" header, why? Try it out:

curl -X DELETE 'http://localhost:5000/locations?id=3'


curl -X GET 'http://localhost:5000/locations?id=3'
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download