Make an HTTP/2 request
Ask for HTTP/2 and check the protocol and alt-svc in the response headers.
curl --http2 -sI https://example.com | grep -i 'http\|alt-svc'
- tool
- curl21 commands
More curl commands
-
curl --resolve example.com:443:1.2.3.4 https://example.comSend the request to a chosen IP for a host:port pair. Handy for testing a server behind a CDN or load balancer.
-
curl --retry 5 --retry-delay 2 --retry-all-errors https://api.example.com/healthzRetry up to 5 times, 2 seconds apart, on any error.
-
curl -d 'user=alice&pass=secret' -X POST https://auth.example.com/loginSend form data in URL-encoded format.
-
curl --cert client.crt --key client.key --cacert ca.crt https://secure.example.comMake an mTLS request with a client certificate and your own CA.
-
cat urls.txt | xargs -P 5 -I{} curl -sSL -o /dev/null -w '%{url_effective} %{http_code}\n' {}Request URLs from a file, 5 at a time, and print the final URL and status code for each.