Closed iendjinn closed 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}); }
});
I have the same error when used from Meteor. Any workarounds?
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 );
});