Web Dev Tools

HTTP Clients (Server-side)

Making outbound HTTP requests from Node, Bun, Deno, Workers.

Built-in / native

  • fetch — built into Node 18+, Bun, Deno, Workers, browsers. The default.
  • undici — Node's fetch is built on this; you can use it directly for Pool, Agent, mocking, retry interceptors. The default for performance-sensitive Node code.
  • Bun's fetch — drop-in compatible, very fast.
  • Request / Response / Headers — standard now; same code works on Node + Workers + Deno.

Lightweight wrappers around fetch

  • ofetch (UnJS) — auto-JSON, retries, hooks, error class with data, query helpers. Used by Nuxt / Nitro; works everywhere fetch does. Default if you want a tiny ergonomic wrapper.
  • ky — promise-based, retries, hooks, timeouts, instances. Default if you've used axios and want lighter.
  • redaxiosaxios API in 800 bytes via fetch.
  • wretch — chainable fetch wrapper.

Heavier / older

  • axios — still huge install base; bigger bundle; use ky / ofetch for new code.
  • got — Node-only, very feature-rich (timeouts, hooks, streams, retries); heavier than ofetch.
  • node-fetch — pre-built-in-fetch era; mostly retired.
  • request — deprecated; do not use.

Specialized

  • gRPC clients@grpc/grpc-js (Node), nice-grpc, connect-rpc (HTTP+gRPC bridge).
  • WebSocket clientsws (Node), built-in WebSocket (browsers / Workers / Bun / Deno).
  • Server-Sent Events — built-in EventSource; eventsource-parser for streaming LLM responses.
  • GraphQL clients — see Data Fetching.

Mocking / testing

  • MSW (Mock Service Worker) — intercept fetch in tests / dev / Storybook with the same mocks. Default.
  • nock — older; Node-specific HTTP interceptor.
  • undici's MockAgent — built-in for undici / Node fetch.
  • Polly.js — record / replay HTTP.

Generated clients (typed from spec)

  • openapi-fetch + openapi-typescript — typed fetch from any OpenAPI.
  • Hey API — full TS clients from OpenAPI; see OpenAPI Tooling.
  • GraphQL Code Generator — typed GraphQL clients.
  • gql.tada — type-safe GraphQL via type-only inference.

Pick this if…

  • Default new code: fetch directly, or ofetch / ky for ergonomics.
  • Performance-sensitive Node: undici directly.
  • Migrating off axios: ky.
  • Typed client from a third-party API: openapi-fetch + openapi-typescript.
  • Mocking in tests: MSW.

On this page