npm.io
6.0.0 • Published 6 years ago

@zeit/fetch

Licence
MIT
Version
6.0.0
Deps
5
Size
10 kB
Vulns
0
Weekly
0
Stars
570

@zeit/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:

Name Value
maxSockets 200
maxFreeSockets 20
timeout 60000
freeSocketKeepAliveTimeout 30000

How to use

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

If no fetch implementation is supplied, it will attempt to use peerDep node-fetch.