TsgcHTTP2ClientProperties › Port

Port Property

TCP port used to connect to the HTTP/2 server.

Syntax

property Port: Integer read FPort write FPort;

Default Value

443

Remarks

Defines the listening port of the remote HTTP/2 server. Typical values are 443 for HTTPS/HTTP2 (over TLS with ALPN) and 80 for HTTP/2 cleartext (h2c), but any port accepted by the server is allowed. Most production HTTP/2 deployments require TLS, so 443 is the normal choice. Passing a full URL to one of the request methods overrides Port with the port parsed from the URL.

Example


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

Back to Properties