Nodeh
Nodeh (pronounced node-h) is a simple utility class that wraps Axios' HTTP request module to simplify the usage by chaining methods which at then end, the code is readable and easy to understand.
Installation
npm i nodeh
Usage
Nodeh is a class so you need to import and then instantiate it. Then the methods can be chained together to complete an HTTP request.
const nodeh = ; // example 1: GET requestlet get_request = ;get_request //add the url of the request //send the request //what happens on success //what happens on error // example 2: POST requestlet post_request = ;request //can also use addUrl('https://reqres.in/api/user') //and don't call addPath('/api/users')
Go ahead and give it a try :)
Please let me know of any feedback at @mohsenari on Twitter or @mohsenari on Github.