Returns the entity body.
Calling this method a second or subsequent time will return the already read string.
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 }
Source Code
# File net/http.rb, line 2194 def body read_body() end
<code/>and<pre/>for code samples.