Useful curl switches

In a similar vein to my previous post I want to have a place where I keep track of all the useful curl switches.

    • -L follow redirects
    • -s silent
    • -v verbose
    • -o output file
    • -H (or --header) send custom headers
    • -d (or --data) send data (inline, or a file specified by @<filename>)
    • --data-binary same as above for binary files
    • -X "METHOD" to make a request of custom method
  • -k skip any SSL checks (useful for self-signed certs)

Request types:

    • By default curl does a GET request.
    • -d or -F makes it a POST request.
    • -I generates a HEAD (use this to view headers only)
    • -T sends a PUT
    • -X "METHOD" for a custom method (which could be GET or POST etc.)