Basics and Quick Checks
curl https://example.comcurl -I https://example.comcurl -i https://example.comcurl -v https://example.comPractical curl commands for APIs, headers, auth, redirects, debugging, and download workflows.
This curl cheatsheet focuses on the commands developers actually use to test APIs, inspect headers, debug redirect chains, and automate HTTP requests from the terminal.
curl https://example.comcurl -I https://example.comcurl -i https://example.comcurl -v https://example.comcurl -X POST https://api.example.com/items -H "Content-Type: application/json" -d '{"name":"demo"}'curl -X PUT https://api.example.com/items/42 -H "Content-Type: application/json" -d '{"name":"updated"}'curl -X POST https://example.com/form -d "name=demo&role=admin"curl -F "file=@report.pdf" https://example.com/uploadcurl -H "X-Trace-Id: 123" https://api.example.comcurl -H "Authorization: Bearer <token>" https://api.example.com/mecurl -u username:password https://api.example.comcurl -H "Accept: application/json" https://api.example.com/itemscurl -I https://example.com/old-pathcurl -IL https://example.com/old-pathcurl -L https://example.com/downloadcurl -s -o /dev/null -w "code=%{http_code} total=%{time_total}\n" https://example.comcurl -o response.json https://api.example.com/itemscurl -C - -O https://example.com/archive.zipcurl -sS https://api.example.com/healthcurl -f https://api.example.com/healthThis curl cheatsheet focuses on the commands developers actually use to test APIs, inspect headers, debug redirect chains, and automate HTTP requests from the terminal.
Use curl -I for a quick header check, or curl -IL <url> to follow the full redirect chain and inspect each response.
-i includes response headers in the output, -I fetches only headers, and -v adds verbose request and connection details for debugging.
Need a hand with curl Cheatsheet? Reach out through support or send a feature request with your workflow.