Skip to content

Instantly share code, notes, and snippets.

@pawel-dubiel
Created September 27, 2012 09:55
Show Gist options
  • Save pawel-dubiel/3793211 to your computer and use it in GitHub Desktop.
Save pawel-dubiel/3793211 to your computer and use it in GitHub Desktop.
#Nodejs ( #https, #request, #443, #HEADERS )
var https = require('https');
var options = {method: 'HEAD', host: 'user.tent.is', path: '/'};
var req = https.request(options, function(res) {
console.log(JSON.stringify(res.headers));
}
);
req.end();
req.on('error', function(e) {
console.error(e);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment