TsgcHTTP2ClientProperties › ReadTimeout

ReadTimeout Property

Maximum time in milliseconds to wait for a synchronous HTTP/2 response before raising a timeout.

Syntax

property ReadTimeout: Integer read FReadTimeout write FReadTimeout;

Default Value

60000 (60 seconds)

Remarks

Controls how long synchronous HTTP/2 request methods (Get, Post, …) wait for the response to be fully received. Set to 0 to disable the timeout (infinite wait until the response is fully received or the connection is closed). For large file transfers of 1 GB or more, set this to 0 or a sufficiently high value. Asynchronous requests dispatched via the OnHTTP2Response/OnHTTP2ResponseFragment events are not affected by this timeout.

Example


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

Back to Properties