Save response to file curl
Download silently, fail on error, follow redirects
curl -sSL -o /tmp/result.json https://api.example.com/data
more curl
all 21 commands →
Measure time to first byte
curl -o /dev/null -sS -w 'ttfb: %{time_starttransfer}s\ntotal: %{time_total}s\n' https://example.com
Show response headers only
curl -sI https://example.com
Upload file multipart
curl -F 'file=@./report.pdf' -F 'user=alice' https://upload.example.com/api
HTTP/2 request
curl --http2 -sI https://example.com | grep -i 'http\|alt-svc'
Set custom DNS resolver
curl --resolve example.com:443:1.2.3.4 https://example.com