I'm using the webcams.travel API from RapidAPI (link to API doc) and I've set everything up using browserify, unirest, node, require, etc.
The API response is in json and the Response Header is being output, but the Response Body is supposed to give me an object with webcams, but instead it shows as "undefined". This is my output now:
Is the problem in the parsing of the json, or does it have something to do with unirest? I'm thankful for any help.
Code in my app.js (which is the suggested request snippet from the API site):
var unirest = require('unirest');
unirest.get("https://webcamstravel.p.rapidapi.com/webcams/list/continent=AN?lang=en&show=webcams%3Aimage%2Clocation")
.header("X-RapidAPI-Key", "MY_RAPID_API_KEY")
.end(function (result) {
console.log(result.status, result.headers, result.body);
});