JavaScript HTTP libraries

Updated Nov 2026

JavaScript HTTP libraries send requests to web servers and read their responses in Node.js, browsers, and edge runtimes. A client library wraps each request in an API with defaults for retries, timeouts, and parsed response bodies. These libraries let apps, backend services, and AI agents call external APIs through one configured client.

Popularity

Undici has the most monthly downloads in this comparison, at 1.1B.

LibraryMonthly downloadsStarsLast releaseLicense
Undici
1.3B
7.7KNov 2026MIT
node-fetch
1.1B
8.8KJul 2023MIT
Gaxios
597.4M
3.2KNov 2026Apache-2.0
Axios
563.5M
109.4KNov 2026MIT
Got
205.1M
15.0KOct 2026MIT
make-fetch-happen
149.2M
208May 2026ISC
SuperAgent
126.0M
16.6KNov 2026MIT
ofetch
105.7M
5.4KNov 2025MIT
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Features compared

LibraryNative retry APIBrowser runtimeThrows on HTTP errors by default
UndiciBuilt-inUnsupportedUnsupported
node-fetchUnsupportedUnsupportedUnsupported
GaxiosBuilt-inBuilt-inBuilt-in
AxiosUnsupportedBuilt-inBuilt-in
GotBuilt-inUnsupportedBuilt-in
make-fetch-happenBuilt-inUnsupportedUnsupported
SuperAgentBuilt-inBuilt-inBuilt-in
ofetchBuilt-inBuilt-inBuilt-in
Built-inNot supported

Libraries and code examples

Provides Node HTTP requests, streaming, and configurable dispatchers.

Downloads / mo
1.3B
Stars
7.7K
Last release
8.12.4
License
MIT

Strengths

  • Exposes lower-level request APIs. Use request and stream APIs alongside the Fetch interface.
  • Adds retries through dispatchers. Wrap a dispatcher with RetryAgent to apply retry behavior.

Limitations

  • Response bodies need cleanup. Consume or cancel response bodies to release connection resources.
  • CORS checks are absent. Server code must enforce its own cross-origin access policy.

Quickstart

From README.md
$ npm install undici
import { fetch } from 'undici';

const response = await fetch('https://example.com');
console.log(await response.text());

Undici examples

From open-source projects on GitHub

Brings the Fetch API to Node.js as a standalone module.

Downloads / mo
1.1B
Stars
8.8K
Last release
3.3.2
License
MIT

Quickstart

From README.md
$ npm install node-fetch
import fetch from 'node-fetch';

const response = await fetch('https://github.com/');
const body = await response.text();

console.log(body);

node-fetch examples

From open-source projects on GitHub

Provides a common HTTP client for Google APIs and services.

Downloads / mo
597.4M
Stars
3.2K
Last release
8.3.3
License
Apache-2.0

Quickstart

From README.md
$ npm install gaxios
import {request} from 'gaxios';
const res = await request({url: 'https://google.com/'});

Gaxios examples

From open-source projects on GitHub
request<T>(opts: GaxiosOptions): GaxiosPromise<T> {
    // ensure the user isn't passing in request-style options
    opts = this.configure(opts);
    validate(opts);
    return this.instance.request<T>(opts).catch(e => {
      throw this.processError(e);
    });
  }

Makes HTTP requests through browser and server adapters.

Downloads / mo
563.5M
Stars
109.4K
Last release
1.21.1
License
MIT

Strengths

  • Centralizes request and response handling. Attach interceptors to shared client instances.
  • Supports request cancellation. Cancel in-flight requests with an AbortController signal.

Limitations

  • Requests need an explicit timeout. Configure a timeout so stalled requests cannot wait indefinitely.

Quickstart

From README.md
$ npm install axios
import axios from 'axios';

const response = await axios.get('https://httpbin.org/get');
console.log(response.data);

Provides HTTP requests, retries, and streaming APIs for Node applications.

Downloads / mo
205.1M
Stars
15.0K
Last release
16.2.0
License
MIT

Strengths

  • Retries failed requests by default. Use built-in retry configuration to handle eligible request failures.
  • Provides a streaming request API. Pipe request or response data through the streaming API.

Limitations

  • Requires native ESM imports. CommonJS projects need an ESM integration path.
  • Timeouts need explicit configuration. Set a timeout to bound requests instead of waiting indefinitely.

Quickstart

From readme.md
$ npm install got
import got from 'got';

const {data} = await got.post('https://httpbin.org/anything', {
	json: {
		hello: 'world'
	}
}).json();

console.log(data);
//=> {"hello": "world"}

Got examples

From open-source projects on GitHub

make-fetch-happen

Provides a fetch client with built-in caching and retries.

Downloads / mo
149.2M
Stars
208
Last release
16.0.1
License
ISC

Quickstart

From README.md
$ npm install --save make-fetch-happen
const fetch = require('make-fetch-happen');

fetch('https://example.com')
  .then(response => response.text())
  .then(console.log);

make-fetch-happen examples

From open-source projects on GitHub

Sends HTTP requests from browsers and Node.js through a fluent API.

Downloads / mo
126.0M
Stars
16.6K
Last release
10.4.2
License
MIT

Quickstart

From index.md
$ npm install superagent
const request = require('superagent');

request.get('https://httpbin.org/get')
  .then(response => console.log(response.body));

SuperAgent examples

From open-source projects on GitHub

Extends the Fetch API for Node.js, browsers, and workers.

Downloads / mo
105.7M
Stars
5.4K
Last release
1.5.1
License
MIT

Quickstart

From README.md
$ npm i ofetch
import { ofetch } from 'ofetch';

const html = await ofetch('https://example.com');
console.log(html);

ofetch examples

From open-source projects on GitHub

FAQ

Axios suits apps that run in browsers and Node.js and want shared interceptors. Undici suits Node.js servers that need control over connections and streams. ofetch suits code built on fetch that wants retries and parsed responses.

Fetch is built into browsers and Node.js and needs no install. Axios adds interceptors, request cancellation, and errors thrown for failed HTTP statuses.

Axios has no built-in retry API. Retries come from an extension package or application code.

Axios interceptors are functions that run before a request is sent and before a response reaches the calling code. They keep shared request and response handling on one client instance.

Undici is an HTTP client written from scratch for Node.js. It exposes request, stream, and pipeline APIs alongside its fetch interface.

node-fetch brings the Fetch API to Node.js as a standalone module. Its current major version requires ESM imports.

For coding agents

Found your HTTP library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official