@eolme/fetchit
v3.1.0
Published
Promise based HTTP client with compatible API.
Downloads
9
Readme
fetchit
Promise based HTTP client with compatible API.
Installation
npm install @eolme/fetchit --save
Note: You will also need a Promise polyfill for older browsers.
Usage
API
Soon.
Importing
Simple importing fetchit
function:
import { fetchit } from '@eolme/fetchit';
fetchit('npmjs.com').then((response) => {
console.log(response);
});
If for some reason you need to access the fetchit
function with another name, it is
available via exports:
import fetch from '@eolme/fetchit';
fetch('npmjs.com').then((response) => {
console.log(response);
});
This approach can be used to, for example, use as replacement for original fetch
function.