Method: HTTP::Message::Body#init_response
- Defined in:
- lib/httpclient/http.rb
#init_response(body = nil) ⇒ Object
Initialize this instance as a response.
419 420 421 422 423 424 425 426 427 428 |
# File 'lib/httpclient/http.rb', line 419 def init_response(body = nil) @body = body if @body.respond_to?(:bytesize) @size = @body.bytesize elsif @body.respond_to?(:size) @size = @body.size else @size = nil end end |