# @zeit/fetch

> Opinionated `fetch` optimized for use inside microservices

Latest version **6.0.0** (published 2020-03-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install @zeit/fetch
pnpm add @zeit/fetch
yarn add @zeit/fetch
bun add @zeit/fetch
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2020-03-03 |
| First published | 2017-10-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 9.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 570 |
| Author | Nathan Rajlich |
| 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 |

## Links

- npm: https://www.npmjs.com/package/@zeit/fetch
- Repository: https://github.com/zeit/fetch
- Homepage: https://github.com/zeit/fetch#readme
- Issues: https://github.com/zeit/fetch/issues
- npm.io page: https://npm.io/package/@zeit/fetch

## Dependencies (5)

- [debug](https://npm.io/package/debug.md) 3.1.0
- [agentkeepalive](https://npm.io/package/agentkeepalive.md) 3.4.1
- [@zeit/fetch-retry](https://npm.io/package/@zeit/fetch-retry.md) ^5.0.0
- [@types/async-retry](https://npm.io/package/@types/async-retry.md) 1.2.1
- [@zeit/fetch-cached-dns](https://npm.io/package/@zeit/fetch-cached-dns.md) 1.2.0

## Recent versions

- 6.0.0 (latest) — 2020-03-03
- 5.2.0 — 2020-01-02
- 5.1.1 — 2019-10-03
- 5.1.0 — 2019-03-18
- 5.0.0 — 2019-03-08
- 3.1.2 — 2019-02-21
- 3.1.1 — 2019-02-21
- 3.1.0 — 2019-02-04
- 3.0.3 — 2018-05-16
- 3.0.2 — 2018-04-30
- 3.0.1 — 2018-04-26
- 3.0.0 — 2018-03-28
- 2.1.0 — 2018-03-22
- 2.0.5 — 2018-02-13
- 2.0.4 — 2017-11-16
- … 6 more at https://npm.io/package/@zeit/fetch/versions

## README

# @zeit/fetch

[![Build Status](https://circleci.com/gh/zeit/fetch.png?style=shield&circle-token=20150f42468743f4b8cfb803681cd9a1847ce3f8)](https://circleci.com/gh/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](https://github.com/node-modules/agentkeepalive),
if not provided, with the following settings:

| Name                         | Value |
|------------------------------|-------|
| `maxSockets`                 | 200   |
| `maxFreeSockets`             | 20    |
| `timeout`                    | 60000 |
| `freeSocketKeepAliveTimeout` | 30000 |

## How to use

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

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

---
_Source: https://npm.io/package/@zeit/fetch · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
