nodejs/undici

An HTTP/1.1 client, written from scratch for Node.js

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 23 minutes ago
Added to GitGenius on March 15th, 2025
Created on May 11th, 2018
Open Issues & Pull Requests: 339 (+0)
Number of forks: 843
Total Stargazers: 7,681 (+0)
Total Subscribers: 52 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 6.9 hours
Mean response time: 87.0 days
90th percentile: 229.6 days
Tracked items: 734

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 63% of open issues come from outside the core team, a mix of external reports and the maintainers' own roadmap. Work labelled "interceptors" is answered fastest, typically in about an hour, while "Status: help-wanted" waits about 19 months. 65% of tracked open issues have had no activity in three months, so the open count overstates what is actively being worked. Only 11% of issues opened in the past year have been closed.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 145
New in 7 days: 2
Closed in 7 days: 2
Avg open age: 574 days
Stale 30+ days: 131
Stale 90+ days: 119

Recent activity

Opened in 7 days: 2
Closed in 7 days: 2
Comments in 7 days: 2
Events in 7 days: 3

Top labels

  • bug (538)
  • enhancement (217)
  • good first issue (80)
  • fetch (52)
  • Status: help-wanted (43)
  • Docs (34)
  • question (26)
  • websocket (17)

Detailed Description

Undici is an HTTP/1.1 client written from scratch for Node.js, designed to provide high-performance HTTP communication capabilities. The name derives from the Italian word for eleven, referencing the HTTP/1.1 version number, and also serves as a reference to the television series Stranger Things. The project is maintained under the Node.js organization and provides an alternative to Node.js's built-in HTTP modules with a focus on performance and modern API design.

The repository has demonstrated significant community engagement and maintenance activity.

Undici provides multiple API methods for different use cases. The undici.request method returns a promise with the result of a dispatcher request, accepting URL and RequestOptions parameters. The undici.stream method enables streaming responses through a factory function, while undici.pipeline returns a Duplex stream for two-way communication. The undici.connect method initiates HTTP CONNECT for establishing two-way communications with requested resources. These APIs support fine-grained control over connection pooling, HTTP/1.1 pipelining, custom interceptors, and advanced features like ProxyAgent, Socks5Agent, and MockAgent.

The project distinguishes itself from Node.js's built-in fetch implementation, which has been powered by undici since Node.js v18. While the built-in fetch offers zero dependencies and automatic compression handling, the standalone undici module provides access to the latest features, superior performance particularly with undici.request, and advanced APIs unavailable in the built-in implementation. The repository includes comprehensive benchmarking capabilities, with benchmark files for HTTP/1.1, HTTPS, and HTTP/2 protocols tested against 50 TCP connections with pipelining depth of 10 on Node 24.14.1.

Undici implements body mixins following the Fetch Standard, including arrayBuffer, blob, bytes, json, and text methods for formatting request and response bodies. The project provides an install function that adds fetch-related and web API classes to globalThis, including fetch, Headers, Response, Request, FormData, WebSocket, and EventSource implementations. This enables consistent behavior across different Node.js versions and ensures that related APIs come from the same undici implementation.

The repository includes a powerful HTTP caching interceptor that respects Cache-Control and Expires headers, supports ETag and Last-Modified validation, and offers both in-memory and persistent SQLite storage options. Documentation is comprehensive, with dedicated files for various APIs accessible through the project's documentation site. The project maintains active issue tracking with clear categorization and provides multiple channels for community engagement, including Q&A discussions and an official OpenJS Slack channel for contributors and users seeking assistance.