cURL Cheatsheet
View SourceFlags
Examples
Header
curl -H "Authorization: Bearer 1234567890" https://example.com
Method
curl -X POST https://example.com
Data
curl -d "foo bar" https://example.com
Cookies
curl -b "my_cookie=my_value" https://example.com
Follow redirects
curl -L https://example.com
Basic auth
This will authenticate the user foo
with the password bar
curl -u foo:bar https://example.com
Proxy
This will authenticate the user foo
with the password bar
for the proxy myproxy.example.com
curl -x myproxy.example.com -U foo:bar https://example.com
Insecure Request
curl -k https://example.com