/fetchw

This library is fetch wrapper.

Primary LanguageTypeScriptMIT LicenseMIT

fetchw

This library is fetch wrapper.

Installation

npm install fetchw

or

yarn add fetchw

Usage

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,
  },
});

or es6

import { get } from 'fetchw';
get({ endpoint: '/users' });

patch({
  endpoint: '/users',
  payload: {
    uuid,
    username,
  },
});

post({
  endpoint: '/users',
  payload: {
    email,
    username,
    password,
  },
});

License

MIT