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 12 December 2022 15:40:25 by James
Updated 21 January 2024 14:54:02 by James