Measure time to first byte curl
Benchmark TTFB and total request time
curl -o /dev/null -sS -w 'ttfb: %{time_starttransfer}s\ntotal: %{time_total}s\n' https://example.com
more curl
all 21 commands →
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
Retry on failure
curl --retry 5 --retry-delay 2 --retry-all-errors https://api.example.com/healthz