You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Universal WHATWG Fetch API for Node, Browsers, Workers and React Native. The scenario that cross-fetch really shines is when the same JavaScript codebase needs to run on different platforms.
10
2
11
3
-**Platform agnostic**: browsers, Node or React Native
@@ -15,118 +7,6 @@ Universal WHATWG Fetch API for Node, Browsers, Workers and React Native. The sce
15
7
-**TypeScript support**: better development experience with types.
16
8
-**Worker support**: works on different types of workers such as Service Workers and CloudFlare Workers
17
9
18
-
19
-
* * *
20
-
21
-
## Table of Contents
22
-
23
-
-[Install](#install)
24
-
-[Usage](#usage)
25
-
-[Demo \& API](#demo--api)
26
-
-[FAQ](#faq)
27
-
-[Yet another fetch library?](#yet-another-fetch-library)
28
-
-[Why polyfill might not be a good idea?](#why-polyfill-might-not-be-a-good-idea)
29
-
-[How does cross-fetch work?](#how-does-cross-fetch-work)
30
-
-[Who's Using It?](#whos-using-it)
31
-
-[Thanks](#thanks)
32
-
-[License](#license)
33
-
-[Author](#author)
34
-
35
-
* * *
36
-
37
-
## Install
38
-
39
-
```sh
40
-
npm install --save cross-fetch
41
-
```
42
-
43
-
As a [ponyfill](https://github.com/sindresorhus/ponyfill) (imports locally):
You can find a comprehensive doc at [Github's fetch](https://github.github.io/fetch/) page. If you want to play with cross-fetch, check our [**JSFiddle playground**](https://jsfiddle.net/lquixada/3ypqgacp/).
124
-
125
-
> **Tip**: Run the fiddle on various browsers and with different settings (for instance: cross-domain requests, wrong urls or text requests). Don't forget to open the console in the test suite page and play around.
126
-
127
-
128
-
## FAQ
129
-
130
10
#### Yet another fetch library?
131
11
132
12
I did a lot of research in order to find a fetch library that could be simple, cross-platform and provide polyfill as an option. There's a plethora of libs out there but none could match those requirements.
@@ -146,19 +26,3 @@ Just like isomorphic-fetch, it is just a proxy. If you're in node, it delivers y
146
26
|:---:|:---:|:---:|:---:|:---:|:---:|
147
27
|The New York Times|Apollo GraphQL|Facebook|Swagger|VulcanJS|graphql-request|
148
28
149
-
150
-
## Thanks
151
-
152
-
Heavily inspired by the works of [matthew-andrews](https://github.com/matthew-andrews). Kudos to him!
0 commit comments