class Seahorse::Client::Http::Response

def body=(io)

Parameters:
  • io (#read, #size, #rewind) --
def body=(io)
  @body = case io
    when nil then StringIO.new('')
    when String then StringIO.new(io)
    else io
  end
end

def body_contents

Returns:
  • (String) -
def body_contents
  body.rewind
  contents = body.read
  body.rewind
  contents
end

def initialize(options = {})

Options Hash: (**options)
  • :body (IO) --
  • :headers (Headers) --
  • :status_code (Integer) --
def initialize(options = {})
  @status_code = options[:status_code] || 0
  @headers = options[:headers] || Headers.new
  @body = options[:body] || StringIO.new
end