Where is body in a nodejs http.get response?

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:"https://stackoverflow.com/"})

> res.finished
true

> res._hasBody
true

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?

11 Answers
11

Leave a Comment