Tips and trick using curl

Categories: linux webserver

Download files

curl -O https://test.example.com/madplan.json
curl -O -L http://test.example.com/madplan.json # Follows links. In this example the http request will be redirected to https
curl -o test.json https://test.example.com/test.json # Saves the file as test.json
 

Send host header

Usefull when the server is hosting multiple domains

curl -H "host: test.example.com" http://172.16.0.150


Read More →