class HTTParty::Response

:nodoc:

def class

def class
  Response
end

def code

def code
  response.code.to_i
end

def initialize(response, parsed_response)

def initialize(response, parsed_response)
  @response = response
  @body = response.body
  @parsed_response = parsed_response
  @headers = Headers.new(response.to_hash)
end

def inspect

def inspect
  inspect_id = "%x" % (object_id * 2)
  %(#<#{self.class}:0x#{inspect_id} @parsed_response=#{parsed_response.inspect}, @response=#{response.inspect}, @headers=#{headers.inspect}>)
end

def method_missing(name, *args, &block)

def method_missing(name, *args, &block)
  if parsed_response.respond_to?(name)
    parsed_response.send(name, *args, &block)
  elsif response.respond_to?(name)
    response.send(name, *args, &block)
  else
    super
  end
end