cURL

ref – http://makandracards.com/makandra/1145-how-to-send-http-requests-using-curl


curl http://localhost:6680/results -GET

to send a HTTP request

Download a Single File

The following command will get the content of the URL and display it in the STDOUT (i.e on your terminal).


$ curl http://www.centos.org

ryh:Desktop rickytsao$ curl http://www.centos.org

301 Moved Permanently

301 Moved Permanently


nginx/0.8.55



ryh:Desktop rickytsao$

Download file and store in file

To store the output in a file, you an redirect it as shown below. This will also display some additional download statistics.

$ curl http://www.centos.org > centos-org.html