Elegant HTTP client based on Axios
- All axios features
- Make HTTP requests
- Code clean on usage
- Reuse client HTTP
- Beautify implemetation
Using npm:
$ npm i http-beautify
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