@antavo/api-client-node

Antavo API Client helps you send secure HTTP requests (for APIs).

Usage no npm install needed!

<script type="module">
  import antavoApiClientNode from 'https://cdn.skypack.dev/@antavo/api-client-node';
</script>

README

Antavo API Client

Antavo API Client helps you send secure HTTP requests (for APIs).

Usage

  1. Get the Client class in order to initialize it later:

    var Client = require("@antavo/api-client-node").Client
    
  2. 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