These curl recipes show you how to send GET requests with curl. The GET method is the default method for making requests in curl so you don't have to specify any arguments.
Send a GET Request and Print the Response to Screen
curl https://catonmat.net
You don't need to specify any arguments to make a GET request. It's curl's default request method. This recipe makes a GET request to https://catonmat.net
and prints the returned content to screen.
Send a GET Request and Save the Response to a File
curl -o response.txt https://catonmat.net
In this recipe, curl makes a GET request to https://catonmat.net
and uses the -o response.txt
argument to save the body of the HTTP response to response.txt
file.
Created by Browserling
These curl recipes were written down by me and my team at Browserling. We use recipes like this every day to get things done and improve our product. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!
Secret message: If you love my curl recipe, then I love you, too! Use coupon code CURLLING to get a discount at my company.