PACKAGE · HTTP CLIENT

undici

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

WEEKLY DOWNLOADS 347.4M
STARS 7.8K
FORKS 1.2K
OPEN ISSUES 469
GZIP SIZE 249.0 kB
UNPACKED SIZE 2.2 MB
DEPENDENCIES 1
LAST UPDATED 9mo ago
DOWNLOAD TRENDS

undici downloads · last 12 months

Download trends for undici1 download series from Nov 2025 to Oct 2026. Use left and right arrow keys to inspect monthly values.0263.2M526.5M789.7M1053.0MNov 2025FebMayAugOct 2026
undici
ABOUT UNDICI

Undici is an HTTP/1.1 client written from scratch for Node.js. It provides a way for Node.js programs to send HTTP requests and handle responses through a dedicated client implementation rather than relying on a browser-oriented networking layer.

Its design centers on implementing HTTP/1.1 for Node.js, making it relevant to developers who need direct control over outbound HTTP communication. The package description identifies the client protocol and runtime, while its client, HTTP, and Node.js topics place it in the server-side networking ecosystem.

Undici offers several ways to structure requests, including the lower-level Client and Pool APIs and higher-level request and fetch interfaces. These patterns let code choose between managing connections directly and issuing requests through a more concise interface; response bodies can also be consumed as streams, which supports incremental processing.

Use Undici in Node.js services, command-line tools, and other server-side programs that call HTTP endpoints. It can also fit workflows that need explicit connection handling or streaming response consumption, while remaining focused on HTTP/1.1 rather than serving as a general-purpose framework.

The package is MIT licensed and has an unpacked size of 2.2 MB; the provided gzip bundle size is 249.0 kB. Its listed weekly downloads are 355.8M, with 7.7K GitHub stars and 1.1K forks; the listing reports 463 open issues and a last update of 2026-11-21, so check current documentation and compatibility details before adopting a particular API.

Undici is specifically described as an HTTP/1.1 client, so applications that require other protocols should use an appropriate client or separate transport. Its connection-oriented APIs also introduce more choices than a basic one-off request interface, so select the API style according to whether connection management or request simplicity is the priority.

WHEN TO USE
  • When a Node.js service needs to send HTTP/1.1 requests, use Undici's request or fetch interface to issue calls and consume responses.
  • When you need explicit control over a connection to an HTTP origin, use the Client API rather than hiding connection handling behind a higher-level interface.
  • When an application makes repeated requests and should organize work around pooled connections, use the Pool API and configure the request flow around that pool.
  • When a response may be large or should be processed incrementally, consume its body as a stream instead of buffering the complete response first.
  • When building a Node.js command-line tool that calls HTTP endpoints, use Undici to keep outbound HTTP work within the Node.js runtime.
  • When you want an HTTP/1.1 client implementation written specifically for Node.js, evaluate Undici's APIs against your request and connection-management needs.
WHEN NOT TO USE
  • If the application must communicate over a protocol other than HTTP/1.1, choose a client designed for that protocol; Undici's stated scope is HTTP/1.1.
  • If you only need an especially minimal one-off request interface, consider a lighter HTTP client abstraction; Undici also exposes connection-oriented APIs that may be unnecessary for that flow.
  • If your code cannot consume streamed response bodies or manage their completion appropriately, use an interface that buffers responses automatically or add explicit body-consumption handling.
  • If your deployment imposes a strict package-size budget, compare the listed 2.2 MB unpacked size and 249.0 kB gzip bundle size with the budget before adding Undici.
  • If your project depends on a specific API behavior or compatibility guarantee, verify the current Undici documentation and runtime requirements before adopting it; the supplied package details do not specify those guarantees.
  • If you need framework-level routing, middleware, or server features rather than an outbound HTTP client, select a tool built for those responsibilities instead of using Undici as a framework.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 6
undici vs node-fetch ★ 8.8K · 298.7M/wk undici vs superagent ★ 16.6K · 33.4M/wk undici vs ky ★ 17.2K · 10.1M/wk undici vs ofetch ★ 5.4K · 28.2M/wk undici vs got ★ 15.0K · 52.8M/wk undici vs axios ★ 109.5K · 146.3M/wk