talira

Compare

undicinode-fetchaxiosGot
What it isAn HTTP/1.1 client, written from scratch for Node.jsA light-weight module that brings the Fetch API to Node.jsPromise based HTTP client for the browser and node.jsHuman-friendly and powerful HTTP request library for Node.js
KindOpen sourceOpen sourceOpen sourceOpen source
Trust0.320.110.280.34
Stars————
Last commit————
LicenceMITMITMITMIT
PricingFree and open sourceFree and open sourceFree and open sourceFree and open source
Free tierYesYesYesYes
Self-hostableYesYesYesYes
Ways to run it————
SOC 2————
HIPAA————
SSO————
APIYesYesYesYes
Plugins———Yes
MCP server————
CompanyNode.js and OpenJS Foundation———
Features
  • request, stream, pipeline, connect and upgrade APIs
  • WHATWG fetch implementation, the one built into Node.js since v18
  • Client, Pool, BalancedPool, RoundRobinPool and Agent dispatchers with keep-alive
  • HTTP/2 when the server prefers it through ALPN (allowH2), and H2CClient for cleartext HTTP/2
  • optional HTTP/1.1 pipelining
  • ProxyAgent, EnvHttpProxyAgent (http_proxy, https_proxy, no_proxy) and Socks5ProxyAgent
  • RetryAgent and retry handler
  • interceptors: redirect, retry, dump, dns, cache, decompress, responseError and deduplicate
  • All 19 features
  • window.fetch-compatible API
  • native promises and async functions
  • Node.js streams for request and response bodies
  • gzip, deflate and brotli decoding
  • redirect limit and response size limit
  • FetchError and AbortError types
  • AbortSignal cancellation
  • custom http.Agent
  • All 9 features
  • XMLHttpRequest and fetch in browsers, http module in Node.js
  • Promise API with async/await
  • request and response interceptors
  • request and response data transforms
  • cancellation with AbortController
  • automatic JSON serialization and parsing
  • multipart/form-data and URL-encoded serialization
  • upload and download progress events
  • All 14 features
  • promise API and stream API
  • retries on failure, on by default
  • advanced timeouts per request phase
  • pagination API
  • RFC 7234 compliant caching
  • cookies
  • HTTP/2 support
  • proxy support and Unix domain sockets
  • All 15 features
Limitations
  • Doesn't work without WebAssembly: its HTTP/1 parser needs it, so requests fail with ERR_WEBASSEMBLY_NOT_SUPPORTED under --jitless
  • Doesn't support the Expect: 100-continue request header: it sends the body at once and ignores 100 Continue
  • Doesn't implement CORS in fetch: no preflight requests or Access-Control-Allow-Origin checks
  • Doesn't load with require() in CommonJS from v3: version 3 is ESM only, and v2 stays CommonJS-compatible
  • Doesn't keep cookies between requests: there's no cookie store, so you read Set-Cookie headers yourself
  • Doesn't cache responses: there's no built-in HTTP caching
  • HTTP/2 support is experimental: only the Node.js http adapter has it, and behaviour depends on the runtime and Node.js version
  • Doesn't run in the browser: it's an HTTP library for Node.js only
  • Doesn't provide a CommonJS export: it's native ESM, so CommonJS projects must convert to ESM