Bearer token auth curl
Attach JWT/Bearer token in Authorization header
curl -H 'Authorization: Bearer $TOKEN' https://api.example.com/me
more curl
all 21 commands →
Follow redirects with verbose
curl -Lv --max-redirs 5 https://example.com
Save response to file
curl -sSL -o /tmp/result.json https://api.example.com/data
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