class SirenClient::RawResponse

Attributes

response[RW]

Public Class Methods

new(http_res) click to toggle source
# File lib/siren_client/raw_response.rb, line 5
def initialize(http_res)
    unless http_res.class == HTTParty::Response
      raise InvalidResponseError, "SirenClient::RawResponse expects a HTTParty::Response instance."
    end
    @response = http_res
end

Public Instance Methods

body() click to toggle source
# File lib/siren_client/raw_response.rb, line 16
def body
  @response.body
end
code() click to toggle source
# File lib/siren_client/raw_response.rb, line 20
def code
  @response.code
end
headers() click to toggle source
# File lib/siren_client/raw_response.rb, line 28
def headers
  @response.headers
end
message() click to toggle source
# File lib/siren_client/raw_response.rb, line 24
def message
  @response.message.strip
end
parsed_response() click to toggle source
# File lib/siren_client/raw_response.rb, line 12
def parsed_response
  @response.parsed_response
end