TsgcHTTP2Client › Properties › HTTP2Options
Client-side tuning options for HTTP/2, including how fragmented DATA frames are delivered to the application.
property HTTP2Options: TsgcWSHTTP2Client_Options read FHTTP2Options write SetHTTP2Options;
FragmentedData=h2fdOnlyBuffer
The FragmentedData sub-property controls how the client dispatches DATA frames that arrive in multiple fragments:
h2fdOnlyBuffer (default): the client buffers every fragment internally and raises OnHTTP2Response only when the last DATA frame for the stream has been received (END_STREAM flag set).h2fdAll: the OnHTTP2ResponseFragment event is raised for each packet received and OnHTTP2Response is still raised with the full payload when the stream ends.h2fdOnlyFragmented: only OnHTTP2ResponseFragment is raised, once per packet; the full payload is never reassembled by the component. Use this mode to stream very large responses with minimal memory usage.
oHTTP2 := TsgcHTTP2Client.Create(nil);
oHTTP2.Host := 'http2.akamai.com';
oHTTP2.Port := 443;
oHTTP2.TLS := True;
oHTTP2.HTTP2Options.FragmentedData := h2fdAll;