Client certificate auth curl
mTLS request with client cert and custom CA
curl --cert client.crt --key client.key --cacert ca.crt https://secure.example.com
more curl
all 21 commands →
Parallel downloads with xargs
cat urls.txt | xargs -P 5 -I{} curl -sSL -o /dev/null -w '%{url_effective} %{http_code}\n' {}
WebSocket handshake test
curl -i -N -H 'Upgrade: websocket' -H 'Connection: Upgrade' -H 'Sec-WebSocket-Key: x3JJHMbDL1EzLkh9GBhXDw==' -H 'Sec-WebSocket-Version: 13' http://localhost:8080/ws
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 '^[<>*]'