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';



Revision #2
Created 2022-12-12 15:40:25 UTC by James
Updated 2024-01-21 14:54:02 UTC by James