Skip to content

antonio-gustavo/http-beautify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An elegant way to make requests with code reuse

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published