[Network] HTTP/2 簡介與CURL測試方法

Intro

HTTP/2 Wiki


測試方法

首先可以檢查CURL是否支援HTTP2:

$ curl --version
...
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz HTTP2 UnixSockets HTTPS-proxy

CURL –http2

HTTP/2 with curl

利用CURL的--http2參數指定開啟HTTP/2並用的-I參數回傳Header確認Protocol:

$ curl --http2 -I https://www.google.com
HTTP/2 200 
content-type: text/html; charset=ISO-8859-1
...

Leave a Reply

Your email address will not be published. Required fields are marked *