WebSocket handshake test curl
Verify WebSocket upgrade handshake responds with 101
curl -i -N -H 'Upgrade: websocket' -H 'Connection: Upgrade' -H 'Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==' -H 'Sec-WebSocket-Version: 13' http://localhost:8080/ws
more curl
all 21 commands →
Rate-limit download speed
curl --limit-rate 1M -O https://example.com/bigfile.iso
POST JSON payload
curl -s -X POST https://api.example.com/v1/resource -H 'Content-Type: application/json' -H 'Authorization: Bearer <token>' -d '{"key":"value"}' | jq .
Follow redirects with verbose
curl -sLv https://example.com 2>&1 | grep -E '^[<>*]'
Time a request
curl -so /dev/null -w 'DNS: %{time_namelookup}s\nConnect: %{time_connect}s\nTTFB: %{time_starttransfer}s\nTotal: %{time_total}s\n' https://example.com
Download with progress
curl -L --progress-bar -o output.file https://example.com/file.tar.gz