@josephdaw/http
v1.0.2
Published
A very basic, custom http request wrapper
Downloads
12
Readme
HTTP wrapper
Table of Contents
Description
This is a custom http wrapper. This module is to enable the user to absract away the http calls and focus on the data.
Installation
Using npm
npm install @josephdaw/http
Usage
Importing
const http = require('@josephdaw/http');
GET
http.get(url)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.log(error);
});
POST
http.post(url, data)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.log(error);
});
PUT
http.put(url, data)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.log(error);
});
DELETE
http.delete(url)
.then((response) => {
console.log(response);
})
.catch((error) => {
console.log(error);
});
Issues and Requests
Please report any bugs or feature requests via GitHub Issues.
Security
Please report any security issues to [email protected]. Find more information in our Security Policy
Contributing
All development of this project happens through GitHub. We welcome constructive collaboration from the community to help implement new features or fix bugs. For more information please read our Contribution Guide
Changelog
Every significant change is documented in the changelog file.
License
This project is released under the MIT License.