Quantcast
Channel: Where is the body in a nodejs http.get response? - Stack Overflow
Viewing all articles
Browse latest Browse all 24

Where is body in a nodejs http.get response?

$
0
0

I'm reading the docs at http://nodejs.org/docs/v0.4.0/api/http.html#http.request, but for some reason, I can't seem to to actually find the body/data attribute on the returned, finished response object.

> var res = http.get({host:'www.somesite.com', path:'/'})> res.finishedtrue> res._hasBodytrue

It's finished (http.get does that for you), so it should have some kind of content. But there's no body, no data, and I can't read from it. Where is the body hiding?


Viewing all articles
Browse latest Browse all 24

Trending Articles