TsgcHTTP2Client, İstemci HTTP/2 Bileşenini uygular ve HTTP/2 sunucularına bağlanabilir.
TsgcHTTP2Client, İstemci HTTP/2 Bileşenini uygular ve HTTP/2 sunucularına bağlanabilir. Bu bileşeni yapılandırmak için aşağıdaki adımları izleyin:
1. TsgcHTTP2Client bileşeninin yeni bir örneğini oluşturun.
2. İsteği sunucuya gönderin ve yanıtı OnHTTP2Response olayını kullanarak işleyin. örnek:
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;