# fetch-everywhere

> Isomorphic WHATWG Fetch API, for ALL node based environments.

Latest version **1.0.5** (published 2016-06-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install fetch-everywhere
pnpm add fetch-everywhere
yarn add fetch-everywhere
bun add fetch-everywhere
```

## 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 | 1.0.5 |
| Published | 2016-06-21 |
| First published | 2016-04-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 52 |
| Author | Lucas Feliciano |
| Maintainers | lucasfeliciano |
| Keywords | fetch, isomorphic-fetch, http, request, webpack, browserify, react-native, browser, whatwg-fetch, whatwg |

## Links

- npm: https://www.npmjs.com/package/fetch-everywhere
- Repository: https://github.com/lucasfeliciano/fetch-everywhere
- Homepage: https://github.com/lucasfeliciano/fetch-everywhere/issues
- Issues: https://github.com/lucasfeliciano/fetch-everywhere/issues
- npm.io page: https://npm.io/package/fetch-everywhere

## Dependencies (2)

- [node-fetch](https://npm.io/package/node-fetch.md) ^1.0.1
- [whatwg-fetch](https://npm.io/package/whatwg-fetch.md) >=0.10.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2016-06-21
- 1.0.4 — 2016-06-10
- 1.0.3 — 2016-06-10
- 1.0.2 — 2016-04-04

## README

WHATWG `fetch` API for ALL JavaScript environments.  Built on top of [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) & [GitHub's WHATWG Fetch polyfill](https://github.com/github/fetch).

The idea behind this npm module is to support ALL JavaScript environments. If doesn't work for you, open a issue and we will support it.

:)

## Suported environments

- node.js
- browser
- browserify
- webpack
- react-native

## Warnings

- This adds `fetch` as a global so that its API is consistent between client and server.
- You must bring your own ES6 Promise compatible polyfill, I suggest [es6-promise](https://github.com/jakearchibald/es6-promise).

## Installation

### NPM

```sh
npm install --save fetch-everywhere es6-promise
```

### Bower

```sh
bower install --save fetch-everywhere es6-promise
```

## Usage

```js
require('es6-promise').polyfill();
require('fetch-everywhere');

fetch('//offline-news-api.herokuapp.com/stories')
	.then(function(response) {
		if (response.status >= 400) {
			throw new Error("Bad response from server");
		}
		return response.json();
	})
	.then(function(stories) {
		console.log(stories);
	});
```

## License
Thanks to

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