Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.
/ fetch Public archive

Opinionated `fetch` (with retrying and DNS caching) optimized for use with Node.js

Notifications You must be signed in to change notification settings

vercel/fetch

Repository files navigation

This repository is now archived. See this post for more details: #83

Fetch Monorepo

This fetch monorepo contains three packages:

  • @vercel/fetch
  • @vercel/fetch-retry
  • @vercel/fetch-cached-dns

These packages are designed for use with Node.js in order to bring the familiarity of the Fetch API to the backend. There are future plans to make this project interoperable between both browser and server environments.

Getting Started

@vercel/fetch bundles all packages inside this monorepo together into a super-powered fetch client. By default, this package will use its peer dependency node-fetch, but it also supports other fetch implementations.

// Basic Usage
import fetch from '@vercel/fetch';
// Bring your own fetch implementation
import createFetch from '@vercel/fetch';
import fetchImpl from 'some-fetch-implementation';
const fetch = createFetch(fetchImpl);

Contributing

Please see our CONTRIBUTING.md

Code of Conduct

Please see our CODE_OF_CONDUCT.md