@antavo/api-client-node
v1.1.0
Published
Antavo API Client helps you send secure HTTP requests (for APIs).
Downloads
4
Readme
Antavo API Client
Antavo API Client helps you send secure HTTP requests (for APIs).
Usage
Get the Client class in order to initialize it later:
var Client = require("@antavo/api-client-node").Client
Create a new client object like:
var client = new Client(ENVIRONMENT, API_KEY, API_SECRET)
Requests
GET
var response = client.get(URI).getBody('utf8')
POST
var response = client.post(URI, DATA_OBJECT).getBody('utf8')
Responses
| Key | Type | Description | |------------|-----------------------|------------------------------------------------------------------| | statusCode | Integer | HTTP status code of the request | | headers | Object<String, mixed> | HTTP response headers | | body | Buffer | Response body in raw format. Convert it through getBody('utf8'). | | url | String | Request URL |