@antavo/api-async-client-node
v1.0.1
Published
Antavo API Client helps you send secure HTTP requests asynchronously (for APIs).
Readme
Antavo API Client
Antavo API Client helps you send secure HTTP requests asynchronously (for APIs).
Usage
Get the Client class in order to initialize it later:
var Client = require("@antavo/api-async-client-node").ClientCreate a new client object like:
var client = new Client(ENVIRONMENT, API_KEY, API_SECRET)
Requests
GET
client.get(URI, PARAMS).then().catch()POST
client.post(URI, DATA_OBJECT).then().catch()
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 |
