Skip to content

An http fetcher with basic options to make it simpler

Notifications You must be signed in to change notification settings

ferudinato/bm-minimal-fetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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'
})

About

An http fetcher with basic options to make it simpler

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published