1.0.2 • Published 8 months ago

@josephdaw/http v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

HTTP wrapper

npm (scoped) GitHub Node.js CI Contributor Covenant

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 dev@josephdaw.com. 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.

1.0.2

8 months ago

1.0.0

11 months ago

0.1.0

11 months ago

0.0.1

11 months ago