Cheatsheet Pages / curl Cheatsheet

How to check which HTTP version curl negotiated — %{http_version}

You expected HTTP/2 and want proof of what was actually negotiated.

curl -s -o /dev/null -w "HTTP version: %{http_version}\n" https://example.com
# force one: curl --http2 https://example.com
curl Cheatsheet one-page card — commands that actually work
The full one-page card — curl Cheatsheet. Get the complete cheatsheet on GitHub