@nelreina/web-api

3.2.0 • Public • Published

@nelreina/web-api

version 2.0.0 A simplified abstraction of the javascript fetch api

Usage

Simple Methods

import { get, post } from '@nelreina/web-api';

const data = await get('/some-path or http(s)://public/api');

or

Class

import Api from '@nelreina/web-api';

const api = new Api('http(s)://some-host')
const data = await api.get('/some-path');

TODO

  • Add option to add custom headers in class

Readme

Keywords

none

Package Sidebar

Install

npm i @nelreina/web-api

Weekly Downloads

1

Version

3.2.0

License

MIT

Unpacked Size

9.24 kB

Total Files

7

Last publish

Collaborators

  • nelreina