ChimeController.prototype.sendGetRequest = function()

in api/routes/chimeproxy/chimeAPIController.js [74:97]


ChimeController.prototype.sendGetRequest = function (path) {
  var self =  this
  
  return new Promise(function (resolve, reject) {
        var o = aws4.sign({
          service: 'chime',
          host: self.host,
          method: 'GET',
          path: path
        })
        
        request.get({url:"https://"+self.host+path,headers:o.headers},function(err,res,body){
          if (!err)
          {
            body = JSON.parse(body);
            resolve(body)
          }
          else {
            //console.log(err)
            reject(err)
          }
        })
  })
}