node.js http 'get' request with query string parameters
问题 I have a Node.js application that is an http client (at the moment). So I'm doing: var query = require('querystring').stringify(propertiesObject); http.get(url + query, function(res) { console.log("Got response: " + res.statusCode); }).on('error', function(e) { console.log("Got error: " + e.message); }); This seems like a good enough way to accomplish this. However I'm somewhat miffed that I had to do the url + query step. This should be encapsulated by a common library, but I don't see this