TsgcHTTP2Client

TsgcHTTP2Client implementa il componente Client HTTP/2 e può connettersi a server HTTP/2.

Introduzione

TsgcHTTP2Client implementa il componente Client HTTP/2 e può connettersi a server HTTP/2. Seguire i passaggi seguenti per configurare questo componente:

 

1. Creare una nuova istanza del componente TsgcHTTP2Client.

 

2. Invia la richiesta al server ed elabora la risposta utilizzando l'evento OnHTTP2Response. Esempio:

 


    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;

 

Riferimento

Guide