transfer data from or to a server // transfer a URL

Useful flags

--resolve <host:port:address> Provide a custom IP address for a specific host:port pair. Use it like a lightweight /etc/hosts alternative.

-s Silence progress information - pretty much required when piping output as this includes progress information

-c <filename>, -b <filename> Use a cookie jar to save cookies. -c specifies the file to save to, and -b is required to actually send cookies.

Everyday flags

-k Ignore certificate validation errors

-i Display response header information


Headers only

To exclude the body from the response, you can use:

💡 -i and -I are misleading

-i includes headers in output -I does not just show headers - it actually makes a HEAD request which in some cases can result in different headers being returned


Curl Cookbook