adish-post-method-package
v3.6.0
Published
A simple JavaScript package to send HTTP requests to an API.
Downloads
16
Readme
API Client Package
A simple JavaScript package to send HTTP requests to an API.
Installation
npm install adish-post-method-package
## Usage
const ApiClient = require("adish-post-method-package");
const api = new ApiClient("https://api.example.com", {
Authorization: "Bearer token",
});
api.request("/submit", "POST", { name: "John Doe", email: "[email protected]" })
.then(response => console.log(response))
.catch(error => console.error(error));