6.2.4 • Published 1 year ago

@fortaine/fetch v6.2.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@vercel/fetch

Build Status

Opinionated fetch optimized for use inside microservices. Bundles:

It automatically configures an agent via agentkeepalive, if not provided, with the following settings:

NameValue
maxSockets200
maxFreeSockets20
timeout60000
freeSocketKeepAliveTimeout30000

How to use

JavaScript

const fetch = require('@vercel/fetch')(require('some-fetch-implementation'));

TypeScript

import createFetch from '@vercel/fetch';
import * as fetch from 'some-fetch-implementation';
const fetch = createFetch(fetch);

If no fetch implementation is supplied, it will attempt to use native fetch (if available) or peerDep node-fetch as fallback.