fetch-shim

An isomoprhic Fetch function, it just gives you the native one if available, or the one from undici.

3 个版本
安装
npm install fetch-shim
yarn add fetch-shim
pnpm add fetch-shim
bun add fetch-shim
README

Fetch Shim

An isomoprhic Fetch function, it just gives you the native one if available, or the one from undici.

Install

npm install --save fetch-shim

Usage

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 }

License

MIT © Fabio Spampinato

版本列表
1.1.1 2023-02-16
1.1.0 2022-06-01
1.0.0 2022-06-01