var unirest = require("unirest"); var req = unirest("", "https://andlighet.p.rapidapi.com/"); req.headers({ "authorization": "Basic bHlmaW9oOmM3endiZWFnY3BtZnJk", "x-rapidapi-host": "andlighet.p.rapidapi.com", "x-rapidapi-key": "dd321760a6mshf0e759408c6f557p110ecfjsn449a5ffda3ff", "content-type": "application/x-www-form-urlencoded", "useQueryString": true }); req.form({}); req.end(function (res) { if (res.error) throw new Error(res.error); console.log(res.body); });