@zeit/fetch
v6.0.0@zeit/fetch
Opinionated fetch
optimized for use inside microservices. Bundles:
- https://github.com/zeit/fetch-retry
- https://github.com/zeit/fetch-cached-dns
- https://github.com/node-modules/agentkeepalive
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
.
npm i @zeit/fetch
Metadata
- MIT
- Whatever
- Nathan Rajlich
- released 3/3/2020
Downloads
Maintainers
alexaltea, anatrajkovska, andybitz, arunoda, arzafran, atcastle, caarlos0, chibicode, cleishm, codetheory, coetry, dav-is, developit, fivepointseven, gielcobben, gmonaco, guybedford, housseindjirdeh, iamevilrabbit, igorklopov, ijjk, janicklas-ralph, jaredpalmer, javivelasco, jkrems, joecohens, juancampa, keanulee, kikobeats, leo, lfades, lucleray, matheuss, maxleiter, mfix22, mglagola, msweeneydev, nazarenooviedo, nkzawa, paco, paulogdm, prateekbh, quietshu, rabaut, ragojose, rauchg, sarupbanskota, skllcrn, spanicker, styfle, timer, timneutkens, tootallnate, umegaya, williamli, zeit-bot,