@nelreina/rest-client-commonjs

1.2.0 • Public • Published

@nelreina/rest-client

A simple rest client , abstraction of axios

Usage / Example

const RestClient = require "@nelreina/rest-client-commonjs";
const jsonService = RestClient("https://jsonplaceholder.typicode.com");
const anotherService = RestClient("http://localhost:1234");

async () => {
  const data = await jsonService.get("/todos/1");

  const data2 = await anotherService.post("/test", { message: "post me" });

}();

Readme

Keywords

none

Package Sidebar

Install

npm i @nelreina/rest-client-commonjs

Weekly Downloads

2

Version

1.2.0

License

ISC

Unpacked Size

4.16 kB

Total Files

8

Last publish

Collaborators

  • nelreina