Fetch URLs, post data, set headers and debug HTTP from the terminal — the curl flags you actually use. Tap to copy.
curl https://example.comFetch a URL and print the responsecurl -O https://example.com/file.zipDownload and save with the remote filenamecurl -o out.html https://example.comDownload and save to a chosen filenamecurl -L https://example.comFollow redirects to the final URLcurl -I https://example.comFetch only the response headerscurl -s https://example.comSilent mode — hide the progress metercurl -X POST https://api.example.comMake a request with a specific methodcurl -d "name=ada&role=dev" URLSend form-encoded POST datacurl -H "Content-Type: application/json" -d '{"a":1}' URLSend a JSON request bodycurl -d @data.json URLSend the contents of a file as the bodycurl -F "file=@photo.png" URLUpload a file as multipart form datacurl -H "Authorization: Bearer TOKEN" URLSend a custom header (e.g. a bearer token)curl -u user:pass URLUse HTTP basic authenticationcurl --cookie "session=abc" URLSend a cookie with the requestcurl -A "MyAgent/1.0" URLSet a custom User-Agentcurl -v https://example.comVerbose output — show the full exchangecurl -w "%{http_code}\n" -o /dev/null -s URLPrint just the HTTP status codecurl --max-time 10 URLGive up after 10 secondscurl -k https://example.comSkip TLS certificate verification (insecure)curl is how you talk to web servers and APIs from the command line. A bare curl URL prints a response; add -L to follow redirects, -I for just the headers, and -O to save a download. For APIs, -X sets the method, -d sends a body, and -H adds headers like an auth token. When something misbehaves, -v shows the entire request and response so you can see exactly what's happening.