in api/routes/chimeproxy/chimeAPIController.js [47:72]
ChimeController.prototype.sendPutRequest = function (path,body) {
var self = this
return new Promise(function (resolve, reject) {
var o = aws4.sign({
service: 'chime',
host: self.host,
method: 'PUT',
path: path,
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify(body)
})
request.put({url:"https://"+self.host+path,headers:o.headers,body:o.body},function(err,res,body){
if (!err)
{
body = JSON.parse(body);
resolve(body)
}
else {
console.log("put-error-"+err)
reject(err)
}
})
})
}