#!/usr/bin/env sh set -eu url="${1:-https://example.com/}" printf 'HTTP/1.1: '; curl -sS -o /dev/null -w '%{http_version} %{time_total}s ' --http1.1 "$url" printf 'HTTP/2: '; curl -sS -o /dev/null -w '%{http_version} %{time_total}s ' --http2 "$url" printf 'HTTP/3 support depends on how your curl build was compiled; check: curl -V '