Well, you should be able to specify them as an option to get, but if you're going that far it might be better to be more explicit:
get
var options = { host: 'server.name.com', port: '80', path:'/my/path.php', method:'GET', headers: { "A":"B" } }; var req = require("http").request(options, function(res) { ... });
The Xively example does this, but with POST.
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Well, you should be able to specify them as an option to
get
, but if you're going that far it might be better to be more explicit:The Xively example does this, but with POST.