nqminds / nqm-api-tdx

nquiringminds Trusted Data Exchange command and query API interface for nodejs clients
https://nqminds.github.io/nqm-api-tdx/
6 stars 5 forks source link

Superagent in Meteor #3

Closed iendjinn closed 8 years ago

iendjinn commented 8 years ago

Making a get request using superagent in meteor returns error: Error getting data: Cannot read property 'indexOf' of undefined

Example request:

let url = "https://q.nqminds.com/v1/datasets/" + resourceId + "/aggregate"; console.log(url); request .get(url) .query({pipeline: pipeline}) .end(function(err, res){ if(err) {console.log("Error getting data: " + err.message );

}
else {
  onData(null, {lsoas: res.body.data[0].id_array});
}

});

ciokan commented 7 years ago

I have the same error when used from Meteor. Any workarounds?