TsgcHTTP2ClientProperties › Host

Host Property

IP address or DNS name of the HTTP/2 server the client will connect to.

Syntax

property Host: String read FHost write FHost;

Default Value

(empty string)

Remarks

Set Host together with Port to specify the HTTP/2 endpoint. Alternatively, call one of the HTTP/2 request methods (Get, Post, …) with a full URL and Host, Port and TLS are populated automatically from the URL. Host accepts either an IPv4/IPv6 address or a DNS name; the resolver used depends on IPVersion. The host name is also sent in the :authority pseudo-header and in the TLS SNI extension, so it should match the common name on the server certificate.

Example


oHTTP2 := TsgcHTTP2Client.Create(nil);
oHTTP2.Host := 'http2.akamai.com';
oHTTP2.Port := 443;
oHTTP2.TLS := True;

Back to Properties