Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/belak/native-cross-fetch
https://github.com/belak/native-cross-fetch
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/belak/native-cross-fetch
- Owner: belak
- License: apache-2.0
- Created: 2020-06-16T02:13:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-24T16:43:41.000Z (over 4 years ago)
- Last Synced: 2024-10-19T05:50:55.679Z (3 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# native-cross-fetch
[![NPM Version](https://img.shields.io/npm/v/native-cross-fetch.svg?branch=master)](https://www.npmjs.com/package/native-cross-fetch)
[![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue.svg)](https://github.com/belak/native-cross-fetch)Simple fetch for Node and Browsers. This exports the
[node-fetch](https://github.com/node-fetch/node-fetch) library when used in
NodeJS, and `window.fetch` when used in the browser. Note that if you want to
use this in browsers that don't natively support fetch you will need to use a
polyfill like Github's [whatwg-fetch](https://github.com/github/fetch) or use a
different library like [cross-fetch](https://github.com/lquixada/cross-fetch).This was originally developed for usage in Electron apps where it can be assumed
that a native `fetch` implementation exists.