Created
February 14, 2012 03:23
-
-
Save tjanczuk/1823175 to your computer and use it in GitHub Desktop.
Direct HTTPS request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('https').get({ host: 'github.com' }, function (bres) { | |
res.writeHead(bres.statusCode); | |
bres.pipe(res); | |
}).on('error', function (err) { | |
res.writeHead(500); | |
res.end('Error talking to backend: ' + err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment