Requests Commands
Master HTTP requests with cURL from simple GET to complex POST, PUT, and DELETE operations. cURL is the universal tool for testing APIs, debugging endpoints, and automating HTTP workflows from the command line.
12 commands
Pro Tips
Use 'curl -X POST -d @data.json -H "Content-Type: application/json" url' to send JSON from a file.
Add '-v' (verbose) to see the full request/response headers — invaluable for debugging API issues.
Use '-o /dev/null -w "%{http_code}"' to get just the HTTP status code without response body.
Common Mistakes
Never include API keys or tokens directly in shell history. Use environment variables or config files.
POST with '-d' sets Content-Type to application/x-www-form-urlencoded by default. Add '-H "Content-Type: application/json"' for JSON APIs.