Method: Net::HTTPResponse#reading_body
- Defined in:
- lib/net/http/response.rb
#reading_body(sock, reqmethodallowbody) ⇒ Object
body
316 317 318 319 320 321 322 323 324 325 |
# File 'lib/net/http/response.rb', line 316 def reading_body(sock, reqmethodallowbody) #:nodoc: internal use only @socket = sock @body_exist = reqmethodallowbody && self.class.body_permitted? begin yield self.body # ensure to read body ensure @socket = nil end end |