TsgcHTTP2Client

O TsgcHTTP2Client implementa um Componente Cliente HTTP/2 e pode conectar a servidores HTTP/2.

Introdução

O TsgcHTTP2Client implementa o Componente Cliente HTTP/2 e pode conectar a servidores HTTP/2. Siga os passos abaixo para configurar este componente:

 

1. Crie uma nova instância do componente TsgcHTTP2Client.

 

2. Envie a requisição ao servidor e processe a resposta utilizando o evento OnHTTP2Response. exemplo:

 


    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;

 

Referência

Guides