Method: Net::HTTPResponse#body

Defined in:
lib/net/http/response.rb

#bodyObject Also known as: entity

Returns the full entity body.

Calling this method a second or subsequent time will return the string already read.

http.request_get('/index.html') {|res|
  puts res.body
}

http.request_get('/index.html') {|res|
  p res.body.object_id   # 538149362
  p res.body.object_id   # 538149362
}

234
235
236
# File 'lib/net/http/response.rb', line 234

def body
  read_body()
end