Fetch
The Fetch API was adopted as a standard replacement for XMLHTTPRequest in the last few years. It is usually available by default in browser code. However it is not offered out-of-the-box by Node.js
Cross-Fetch
The cross-fetch library provides cross-platform fetch API compatibility for node-like environments.
It can be installed with npm i --save cross-fetch
.
It can be used as an ES6 module via
import fetch from 'cross-fetch';
No Comments