- Pass in username/password:
-u username:password
, to use github tokens,curl -u 2346b76ab68d28071961d15e96e89d09614bec97:x-oauth-basic
- Passing in HTTP headers:
-h "A: B"
, such as-h "Autorization: bearer ABC
- Post a message in the body of curl:
--data "contents"
or-d "contents"
- curl will by default assume it's dealing with a GET, unless a
-d
is passed in, then being considered a POST. To explicitly state which request method you want, you can pass in-X PUT
,-X HEAD
, etc. - Follow redirects:
-L
- Avoid reporting download information:
-s
- Extra information:
-v
,-i
curl --limit-rate 50b 127.0.0.1:8080/random
to limit the rate to 50b/s
sudo netstat -tupln
shows you which ports are currently being used and by which application
- Encode a file in base-64:
base64 <file>
- Decode a string:
base64 -d