There are many things that Curl can do, and there is a voluminous man page that lists all of the details.

Here I want to boil down all those options into the most common and useful ones for web or webservices developers (using HTTP/HTTPS protocols). If you don’t already have Curl installed on your system (try running curl from a command prompt), see Getting Curl below.

Basic Usage

The basic form of all Curl commands is:

curl [options...] <url>

For example:

$ curl http://www.google.com/humans.txt
Google is built by a large team of engineers, designers, researchers, robots, and others in many different sites across the globe. It is updated continuously, and built with more tools and technologies than we can shake a stick at. If you'd like to help us out, see google.com/jobs.

Common Options

Options are the real power of of Curl. Here we’ll cover the most common ones that I’ve used for typical web and webservices development. (You can get the full set of options on your system with curl --help or curl --manual.)

-A / –user-agent AGENT

Set the HTTP User Agent string if you don’t want the default “curl” string

–compressed

Add the HTTP header to request compressed content, if the server can provide it

Getting Curl

If you’re running Windows, you’ll need to download it yourself. Start at the Curl downloads page and find the Win32 section. I suggest the “Win32 – Generic binary, with SSL” option. You will also need the Windows OpenSSL libraries; I suggest using the “Win32 OpenSSL v1.x Light” installer. Make sure to put both Curl and OpenSSL libraries in the same location, and add that location to your path.