Skip to content
This repository has been archived by the owner on Mar 30, 2023. It is now read-only.

can't make http.get to work #20

Open
rafaelcastrocouto opened this issue Mar 1, 2012 · 1 comment
Open

can't make http.get to work #20

rafaelcastrocouto opened this issue Mar 1, 2012 · 1 comment

Comments

@rafaelcastrocouto
Copy link

Am i doing something wrong?

var http = require('http'),
url = require('url');
exports.app = function(req, res){
var options = {
host: 'www.google.com',
port: 80,
path: '/'
};
http.get(options, function(r) {
var data = '';
r.on('data', function(chunk) {
data += chunk;
});
r.on('end', function() {
res.end(data);
});
}).on('error', function(e) {
res.end("Got error: " + e.message);
});

}

@js08
Copy link

js08 commented Sep 29, 2014

hey did u figure it out...how to do

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants