curl
to do requests. It is a simple way to specify that you want to send HTTP/2 requests by using the --http2
option.
Try to use HTTP/2 without SSL
Start by running the binary.> Connection: Upgrade, HTTP2-Settings
that the server tries to upgrade to HTTP/2, but is unsuccessful.
The answer < HTTP/1.1 200 OK
indicates that the server still uses HTTP/1.
Try to use HTTP/2 with SSL
This time, start by generating the SSL certificates. mkcert creates two files:127.0.0.1.pem
and 127.0.0.1-key.pem
.
http://
to https://
.