Closed vasuvanka closed 8 years ago
Hi ranm8,
when am making a rest call using below code am getting res as am expected and then am getting exception as unexpected token u . how to handle the case.
requestify.request("www.api.com", { method: "POST", body: data, dataType: 'json' }).then(function (res) { res.getBody(); res.getHeaders(); res.getCode(); callback(null, res.body); }).catch(function (err) { callback(err); });
waiting for ack asap..thank u
issue resolved..solution is i was multiple times parsing data so that i got above mentioned issue.
Hi ranm8,
when am making a rest call using below code am getting res as am expected and then am getting exception as unexpected token u . how to handle the case.
requestify.request("www.api.com", { method: "POST", body: data, dataType: 'json' }).then(function (res) { res.getBody(); res.getHeaders(); res.getCode(); callback(null, res.body); }).catch(function (err) { callback(err); });
waiting for ack asap..thank u