Hi Ben,

Thanks, that's working, you are right, it was in the doc, but in the
request part, and I ended up using http.request.

Angelo


On Nov 24, 8:59 am, Ben Noordhuis <[email protected]> wrote:
> On Sat, Nov 24, 2012 at 1:51 AM, Angelo Chen <[email protected]> wrote:
> > Hi,
> > how to obtain the data after a http.get? following is sample, that gets only
> > response code:
>
> > var http = require('http')
> > http.get("http://nodejs.org/";, function(res) {
> >   console.log("Got response: " + res.statusCode);
> > }).on('error', function(e) {
> >   console.log("Got error: " + e.message);
> > });
>
>   res.on('data', function(data) {
>     // ...
>   });
>
> I don't want to be _that_ guy but it's in the documentation.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to