Cliente HTTP/2

Componente cliente HTTP/2 nativo para Delphi/C++Builder. Streams multiplexados, compresión de cabeceras (HPACK), TLS mediante OpenSSL o Windows SChannel y framing completo según RFC 9113.

TsgcHTTP2Client

Cliente HTTP/2 nativo — streams multiplexados sobre una sola conexión TLS, compresión de cabeceras HPACK, prior knowledge o upgrade ALPN, sin dependencia de IIS / Apache / Indy.

Clase del componente

TsgcHTTP2Client

Protocolo

HTTP/2 (RFC 9113)

Plataformas

Windows, macOS, Linux, iOS, Android

Edición

Standard / Professional / Enterprise

Coloca el componente, haz GET / POST

Coloca un TsgcHTTP2Client en un formulario, elige IOHandler (OpenSSL o SChannel) y luego invoca Get / Post / Put / Delete con la URL de destino.

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");

Qué incluye

Un cliente HTTP/2 de primera clase basado en el motor de framing sgcQUIC / sgcHTTP2 — sin IIS / Apache / Indy.

Multiplexación de streams

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

Compresión de cabeceras HPACK

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

Elección de TLS

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.

Listo para Apple Push y FCM

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

Especificaciones y referencias

Fuentes autorizadas del protocolo que implementa este componente.

Documentación y Demos

Enlace directo a la referencia del componente, descarga el proyecto demo listo para ejecutar y la prueba gratuita.

Ayuda en línea — TsgcHTTP2Client Referencia completa de propiedades, métodos y eventos de este componente.
Proyecto demo — Demos\20.HTTP_Protocol\01.HTTP2_Server_And_Client Proyecto de ejemplo listo para ejecutar. Se incluye en el paquete sgcWebSockets — descarga la prueba gratuita más abajo.
Documento técnico (PDF) Características, inicio rápido, ejemplos de código para Delphi y C++ Builder y referencias de fuentes primarias — solo este componente.
Manual de usuario (PDF) Manual completo que cubre todos los componentes de la biblioteca.

¿Listo para adoptar HTTP/2 en Delphi?

Descarga la prueba gratuita y añade tráfico HTTP/2 multiplexado a tus aplicaciones Delphi.