0.0.6 • Published 5 years ago

@mezmerik/http v0.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@mezmerik/http

A chaining JavaScript http request utility

  • Currently only accepts json responses

Getting Started

Install @mezmerik/http

Installing

Clone the repository

# with npm
npm install @mezmerik/http

# with yarn
yarn add @mezmerik/http

Usage

// With Babel
import http from '@mezmerik/http';

// GET
const response = await http('http://testurl.com/', options = {})
    .acceptJson()
    .request()

// POST
const response = await http('http://testurl.com/', options = {})
    .withJsonBody({
        // some json body
    })
    .acceptJson()
    .post()
    .request()

// PATCH
const response = await http('http://testurl.com/', options = {})
    .withJsonBody({
        // some json body
    })
    .acceptJson()
    .patch()
    .request()

Built With

Contributing

PR's are welcomed.

Versioning

We follow semver

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

N/A

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago