Hi Jesus, I don’t if is correct, but Im doing it like this:
HttpRequest.get(url).set("Authorization",
"Bearer " + token).timeout(
maxRequestTimeout).then(function (res) {
//console.debug("api.success")
success(res.body)
}).catch(function (err) {
//console.error("api.error:" + JSON.stringify(err))
error(err)
})
I think there is a better example on the documentation