TsgcHTTP2Client › Properties › TLS
Enables a secure TLS connection, which is normally required by HTTP/2 servers.
property TLS: Boolean read FTLS write FTLS;
True
Set TLS to True to negotiate HTTP/2 over TLS (the h2 ALPN protocol); this is what virtually all public HTTP/2 servers require. Set it to False only when the server explicitly supports cleartext HTTP/2 (h2c). When TLS is enabled, TLSOptions controls certificates, verification, TLS version and whether to use OpenSSL or SChannel as IOHandler. Passing a full https:// URL to a request method automatically sets TLS to True.
oHTTP2 := TsgcHTTP2Client.Create(nil);
oHTTP2.Host := 'http2.akamai.com';
oHTTP2.Port := 443;
oHTTP2.TLS := True;