This library is fetch wrapper.
npm install fetchw
yarn add fetchw
This is all you need to get started:
const fetchw = require('fetchw');
fetchw.get({ endpoint: '/users' });
fetchw.patch({
endpoint: '/users',
payload: {
uuid,
username,
},
});
fetchw.post({
endpoint: '/users',
payload: {
email,
username,
password,
},
});
import { get } from 'fetchw';
get({ endpoint: '/users' });
patch({
endpoint: '/users',
payload: {
uuid,
username,
},
});
post({
endpoint: '/users',
payload: {
email,
username,
password,
},
});