On May 24, 4:24 am, thuan le minh <[email protected]> wrote:
> when i use http method to connect and get content data of any
> webpages , there is an error appears : getaddrinfo ENOENT error




Sounds like the machine you're using is having a problem trying to
resolve that particular address.




> my code :
>[...]
>      var res_data = ' ';
>      response.on('data', function(chunk){
>          res_data += chunk;
>      });
>      response.on('end', function(){
>          console.log(res_data);
>      });
>      res.end(res_data);

Unrelated, but I think you meant to put this last line inside the
response.on('end') callback ?

>   req.on('err', function(e){

Also, this should be 'error' not 'err'.

-- 
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