$ npm install fetch-shim
An isomoprhic Fetch function, it just gives you the native one if available, or the one from undici
.
npm install --save fetch-shim
import fetch from 'fetch-shim';
const response = await fetch ( 'https://jsonplaceholder.typicode.com/todos/1' );
const json = await response.json ();
console.log ( json ); // => { userId: 1, id: 1, title: 'delectus aut autem', completed: false }
MIT © Fabio Spampinato
© 2010 - cnpmjs.org x YWFE | Home | YWFE