Back to Explore

szmarczak/http2-wrapper

GitHub
1 watchersOpen source

Last release:

http2-wrapper is a Node.js HTTP/2 client that uses the familiar `https`-style API (`http2.request`, `http2.get`, and `http2.Agent`). It’s useful when you want to use HTTP/2 without rewriting existing code that targets the HTTP/1 API, and it provides Agents and ALPN negotiation (via `http2.auto`) to select HTTP/2 connections.

Project status

  • Maintenance status: The repo appears quiet, with the most recent published updates being v2.2.1 on 2023-11-10, which is a long time ago relative to 2026-08-12 (suggesting it is not actively maintained in practice).
  • Update cadence: Prior updates came roughly every 7 months to 1 year (v2.1.11 in 2022-04, v2.2.0 in 2022-11, v2.2.1 in 2023-11), and there is no evidence of tagged updates after 2023-11. There was an upstream push on 2024-05-07, but the provided data does not indicate resulting new published updates.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v2.2.1

    v2.2.1 updates the HTTP/2 wrapper so that when an HTTP/1.1 request is made, any explicitly provided HTTP/2 pseudo headers are handled correctly. The change primarily targets how headers are translated or removed before calling the underlying `http.request` path.

  • v2.2.0

    v2.2.0 includes a fix for a buffer queue memory leak and improves error reporting when a proxy server rejects a request. When the proxy responds with a non-200 status, the thrown UnexpectedStatusCodeError now captures and prints an HTTP status message (when available) alongside the status code.

  • v2.1.11

    This release (v2.1.11) includes a small behavioral fix related to `delayAsyncDestroy`. CI configuration and tests were also adjusted, but the release notes only mention the `delayAsyncDestroy` return value issue.

  • v2.1.10

    Release v2.1.10 is a small bug fix focused on correctly handling HEADERS frames that use END_STREAM, which in HTTP/2 correspond to trailers behavior. The code changes adjust the internal response initialization and trailer handling flow to avoid incorrect or missing response setup.

  • v2.1.9

    v2.1.9 is described as a fix for rare cases where errors were not being emitted. The code changes shown primarily improve error propagation during the CONNECT flow and adjust destroy behavior in a utility.

  • v2.1.8

    Release v2.1.8 addresses HTTP2 session servername and origin-set calculation. The documented change says it fixes servername calculation again, but the code shows more specific behavioral adjustments related to IP hosts and a Node.js edge case where `socket.servername` becomes `false`.

  • v2.1.7

    v2.1.7 updates the HTTP/2 wrapper to treat the `Connection` header value comparison as case-insensitive. The release notes mention fixing the `connection` header comparison, and the code changes implement that exact behavior. It also adds a regression test to cover an uppercase `KEEP-ALIVE` value.

  • v2.1.6

    v2.1.6 makes a small compatibility change related to optional chaining usage. The only functional code change replaces `options.headers?.host` with an equivalent conditional expression when computing `options.servername`.

  • v2.1.5

    v2.1.5 refactors the server name calculation logic used for HTTP and HTTP/2 requests. It also addresses a rare uncaught request error, likely related to error emission timing on socket/request teardown.

  • v2.1.4

    Release v2.1.4 primarily addresses a TLS servername calculation issue (notably for IP addresses) and updates TypeScript definitions to include ALPNProtocols. The code changes include a behavioral tweak in servername computation plus related type/test adjustments.