Wednesday | 04 DEC 2024
[ previous ]
[ next ]

Curl Cheatsheet

Title:
Date: 2022-11-15
Tags:  cheatsheet

Curl is very useful and these are some of the flags that I use.

-d '{ "key": "value" }' - This lets you add data to a request
-H "Content-Type: application/json" - This lets you add headers
-X POST - This flag sets the request type of the request
-s - This silences curl
-v - This is the verbose flag
-o file-name.html - This saves the response to a filename.
-O - This flag defaults the filename to the remote name

Curl with no parameters will run a GET request with the url you give it.