undici
by
nodejs

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

View on GitHub ↗

Summary Information

Updated 44 minutes ago
Added to GitGenius on March 15th, 2025
Created on May 11th, 2018
Open Issues & Pull Requests: 330 (+0)
Number of forks: 802
Total Stargazers: 7,641 (+0)
Total Subscribers: 51 (+0)

Issue Activity (beta)

Open issues: 153
New in 7 days: 8
Closed in 7 days: 2
Avg open age: 554 days
Stale 30+ days: 137
Stale 90+ days: 99

Recent activity

Opened in 7 days: 8
Closed in 7 days: 1
Comments in 7 days: 6
Events in 7 days: 23

Top labels

  • bug (524)
  • enhancement (214)
  • good first issue (79)
  • fetch (52)
  • Status: help-wanted (43)
  • Docs (34)
  • question (26)
  • websocket (17)

Repository Insights (GitGenius)

Median issue/PR response: 0.0 hours
Mean response time: 86.6 days
90th percentile: 296.9 days
Tracked items: 730

Most active contributors

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. GitGenius tracking data shows a median issue and pull request response latency of 0.0 hours across 730 tracked items, indicating rapid triage and response times. The most active contributors include mcollina with 650 tracked events, metcoder95 with 509 events, and KhafraDev with 354 events. Bug reports represent the most common issue type with 384 tracked instances, followed by enhancement requests with 146 items and good first issue labels with 39 items, suggesting an active development cycle and welcoming environment for new contributors.

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.

undici
by
nodejsnodejs/undici

Repository Details

Fetching additional details & charts...