sin-to-jin / fetchw

This library is fetch wrapper.

Home Page:https://www.npmjs.com/package/fetchw

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

This library is fetch wrapper.

https://www.npmjs.com/package/fetchw

License:MIT License


Languages

Language:TypeScript 97.9%Language:JavaScript 2.1%