bm-minimal-fetch
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

http-minimal-fetch

An http fetcher with basic options to make it simpler

Usage

This package is instanced using a singleton pattern, so you only need to import it like this way:

import HttpRequest from 'bm-minimal-fetch';
const http = HttpRequest.getInstance('http://your-desired-url-to-fetch');

Now if you need to do an HTTP GET request, just type:

http.get('/your-endpoint');

Also, we would be able to send an HTTP POST request, just typing:

http.post('/your-endpoint', {
  user: 'foo',
  lastname: 'bar'
})

Package Sidebar

Install

npm i bm-minimal-fetch

Weekly Downloads

11

Version

1.1.0

License

MIT

Unpacked Size

4.02 kB

Total Files

6

Last publish

Collaborators

  • ferdroid8080