Method: Net::HTTPResponse#reading_body
- Defined in:
- lib/net/http/response.rb
#reading_body(sock, reqmethodallowbody) ⇒ Object
body
163 164 165 166 167 168 169 170 171 172 |
# File 'lib/net/http/response.rb', line 163 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 |