curl -s -O example.tcom/index.html
- Skip HTTPS (SSL) certificate validation
curl -k https://example.com
- Print full HTTP requesst/reponse details
- Send HEAD request (only prints response header)
curl -I https://example.com
- Print response headers and body
curl -i https://example.com
curl https://example.com -A "Mozilla/5.0"
- Pass HTTP basic authorization credentials in the URL
curl https://username:password@example.com:1234
curl -H "Authorization: Basic URNADkd=" https://example.com
curl "https://example.com/search.php?search=ls"
- Send POST request with POST data
curl -X POST -d "username=admin&password=pass" https://example.com
curl -b "PHPSESSID=ckljgdnfakdlssa1" https://example.com
- Send POST request with JSON data
curl -X POST -d "{'search':'htb'}" -H "Content-Type: application/json" https://example.com/search.php
curl https://example.com/api.php/city/newyork
curl -s https://example.com/api,php/city | jq
curl -X PUT https://example.com/api.php/city -d "{'city':'LA','country':'USA'}" -H "Content-Type: application/json"
curl -X DELETE https://example.com/api.php/city/LA