curl

Updated: 21 November 2023

Write output to file instead of stdout

curl http://some.url --output <file>

Basic HTTP server authorisation

curl -u user:pass http://some.url
# or
curl http://user:pass@some.url

Make the operation more talkative

curl --verbose https://www.google.com

By default, every secure connection curl makes is verified to be secure before the transfer takes place. The --insecure option makes curl skip the verification step and proceed without checking.

curl --insecure https://www.example.com

Follow redirects

curl --location https://www.i-have-moved.com

Leave a comment