{"library":"fetch-h2","type":"library","category":null,"description":"fetch-h2 is a robust Node.js implementation of the standard Fetch API, providing a familiar, browser-like interface for making HTTP requests within a Node.js environment. It transparently handles both HTTP/1.1 and HTTP/2 connections, automatically negotiating the protocol via ALPN for `https://` URLs, and defaulting to HTTP/1.1 for `http://` unless `http2://` is explicitly used for plain-text HTTP/2 (h2c). The library is currently stable at version 3.0.2 and receives regular maintenance, including bug fixes and dependency updates. Key differentiators include its close adherence to the Fetch API standard, transparent socket re-use and session management, built-in in-memory cookie support per context, and automatic decoding of `br`, `gzip`, and `deflate` encodings. It offers a higher-level, more developer-friendly abstraction for HTTP/2 client requests in Node.js compared to the lower-level native `http2` module. Since version 3.0.0, it requires Node.js 12 or newer.","language":"javascript","status":"active","version":"3.0.2","tags":["javascript","fetch","h2","http2","client","request","api","typesafe","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install fetch-h2","imports":["import { fetch } from 'fetch-h2'","import { setup } from 'fetch-h2'","import { AbortController } from 'fetch-h2'","import { Response } from 'fetch-h2'"]},{"cmd":"yarn add fetch-h2","imports":[]},{"cmd":"pnpm add fetch-h2","imports":[]}],"homepage":null,"github":"https://github.com/grantila/fetch-h2","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/fetch-h2","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/fetch-h2/compatibility"}}