I see that the request package is the standard for making HTTP API requests with NodeJS. I need to use it to send some requests but in the docs and all the examples I find, I don't see how to pass GET variables. I only see how to pass POST params. Here's my code:
request.get("https://api.example.com", function (err, res, body) {
if (!err) {
var resultsObj = JSON.parse(body);
//Just an example of how to access properties:
console.log(resultsObj.MRData);
}
});
Where to set the GET? I don't like doing it in the URL.