HTTP/2 Client

Native HTTP/2 client component for Delphi/C++Builder. Multiplexed streams, header compression (HPACK), TLS via OpenSSL or Windows SChannel and full RFC 9113 framing.

TsgcHTTP2Client

Native HTTP/2 client — multiplexed streams over a single TLS connection, HPACK header compression, prior knowledge or ALPN upgrade, no IIS / Apache / Indy dependency.

Component class

TsgcHTTP2Client

Platforms

Windows, macOS, Linux, iOS, Android

Edition

Standard / Professional / Enterprise

Drop the component, GET / POST

Drop a TsgcHTTP2Client on a form, choose IOHandler (OpenSSL or SChannel), then call Get / Post / Put / Delete with the target URL.

uses
  sgcHTTP, sgcHTTP2;

var
  HTTP2: TsgcHTTP2Client;
begin
  HTTP2 := TsgcHTTP2Client.Create(nil);
  HTTP2.TLSOptions.IOHandler := iohSChannel; // or iohOpenSSL

  // Add custom headers
  HTTP2.Request.CustomHeaders.Add('authorization: Bearer eyJ...');

  // GET
  Memo1.Text := HTTP2.Get('https://api.example.com/v1/items');
  ShowMessage(IntToStr(HTTP2.Response.Status));
end;
// uses: sgcHTTP, sgcHTTP2
TsgcHTTP2Client *HTTP2 = new TsgcHTTP2Client(this);
HTTP2->TLSOptions->IOHandler = iohSChannel;

HTTP2->Request->CustomHeaders->Add("authorization: Bearer eyJ...");

Memo1->Text = HTTP2->Get("https://api.example.com/v1/items");

What's inside

A first-class HTTP/2 client built on the sgcQUIC / sgcHTTP2 framing engine — no IIS / Apache / Indy.

Stream multiplexing

Multiple GET / POST / PUT / DELETE calls share a single TLS connection. OnHTTP2StreamData surfaces server-push promises and per-stream events.

HPACK header compression

Built-in HPACK encoder/decoder — CustomHeaders are compressed against the dynamic table for every request. Cookies and auth headers are reused across streams.

TLS choice

Set TLSOptions.IOHandler to iohSChannel (Windows kernel TLS, no DLLs) or iohOpenSSL (cross-platform). ALPN h2 negotiation happens during the handshake.

Prior knowledge

For h2c (HTTP/2 over plaintext) set Specifications.HTTP2_PriorKnowledge — useful for service-mesh sidecars and trusted internal links.

Bearer / basic / NTLM

Authentication.Token, Authentication.Basic and Authentication.NTLM handle the common schemes. Pair with TsgcHTTP_JWT_Client to mint and refresh JWTs.

Apple Push, FCM ready

The same component drives the Apple Push Notification HTTP/2 endpoint and Firebase Cloud Messaging V1 — see those pages for typed wiring.

Specifications & references

Authoritative sources for the protocol this component implements.

Documentation & Demos

Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.

Online Help — TsgcHTTP2Client Full property, method and event reference for this component.
Demo Project — Demos\20.HTTP_Protocol\01.HTTP2_Server_And_Client Ready-to-run example project. Ships inside the sgcWebSockets package — download the trial below.
Technical Document (PDF) Features, quick start, code samples for Delphi & C++ Builder and primary-source references — this component only.
User Manual (PDF) Comprehensive manual covering every component in the library.

Ready to Adopt HTTP/2 in Delphi?

Download the free trial and add multiplexed HTTP/2 traffic to your Delphi applications.