http-beautify
v1.1.2
Published
An elegant way to make requests with code reuse
Downloads
45
Readme
http beautify
Elegant HTTP client based on Axios
Table of Contents
Features
- All axios features
- Make HTTP requests
- Code clean on usage
- Reuse client HTTP
- Beautify implemetation
Installing
Using npm:
$ npm i http-beautify
Example
Module usage
import httpBeautify from "http-beautify";
Performing a GET
request
import httpBeautify from "http-beautify";
import yourAxiosInstance from "axios";
class Users extends httpBeautify {
constructor(id) {
let relationship = { books: "books" };
super(id, relationship, yourAxiosInstance);
}
}
const users = new Users(id);
let data = users().show();
//this will build this URL: https://yourdomain.com/users