POST with curl without sending data

Posted by Marcus on Stack Overflow See other posts from Stack Overflow or by Marcus
Published on 2010-05-21T20:15:11Z Indexed on 2010/05/21 20:20 UTC
Read the original article Hit count: 258

Filed under:

Is there a way to use curl to send a POST request without sending any data?

We usually post like:

curl --data @C:\mydata.txt http://1.2.3.4/myapi

If you omit the --data you are doing a GET. How can you omit it and still do a POST?

© Stack Overflow or respective owner

Related posts about curl