Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vercel/fetch
Opinionated `fetch` (with retrying and DNS caching) optimized for use with Node.js
https://github.com/vercel/fetch
Last synced: 3 months ago
JSON representation
Opinionated `fetch` (with retrying and DNS caching) optimized for use with Node.js
- Host: GitHub
- URL: https://github.com/vercel/fetch
- Owner: vercel
- Archived: true
- Created: 2017-10-18T21:05:53.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2023-11-09T22:43:15.000Z (about 1 year ago)
- Last Synced: 2024-05-01T16:14:20.811Z (8 months ago)
- Language: JavaScript
- Homepage: https://npmjs.com/@vercel/fetch
- Size: 895 KB
- Stars: 567
- Watchers: 53
- Forks: 26
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- Contributing: CONTRIBUTING.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
This repository is now **archived**. See this post for more details: https://github.com/vercel/fetch/issues/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](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) client. By default, this package will use its peer dependency [node-fetch](https://github.com/node-fetch/node-fetch), but it also supports other fetch implementations.
```js
// Basic Usage
import fetch from '@vercel/fetch';
``````js
// 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](./CONTRIBUTING.md)
## Code of Conduct
Please see our [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md)