TsgcHTTP2Client

TsgcHTTP2Client implementa el componente cliente HTTP/2 y puede conectarse a servidores HTTP/2.

Introducción

TsgcHTTP2Client implementa el componente cliente HTTP/2 y puede conectarse a servidores HTTP/2. Siga los pasos a continuación para configurar este componente:

 

1. Cree una nueva instancia del componente TsgcHTTP2Client.

 

2. Envíe la solicitud al servidor y procese la respuesta usando el evento OnHTTP2Response. Ejemplo:

 


    oClient := TsgcHTTP2Client.Create(nil);
    oClient.OnHTTP2Response := OnHTTP2ResponseEvent;
    oClient.Get('https://www.google.com');

    procedure OnHTTP2ResponseEvent(Sender: TObject; const
        Connection: TsgcHTTP2ConnectionClient; const Request:
        TsgcHTTP2RequestProperty; const Response: TsgcHTTP2ResponseProperty);
    begin
      ShowMessage(Response.DataString);
    end;

 

Referencia

Guías