class ChimeraHttpClient::Response
Attributes
body[R]
code[R]
deserializer[R]
response[R]
time[R]
Public Class Methods
new(response, options = {})
click to toggle source
# File lib/chimera_http_client/response.rb, line 5 def initialize(response, options = {}) @body = response.body @code = response.code @time = response.total_time @response = response # contains the request @deserializer = options[:deserializer][:response] end
Public Instance Methods
error?()
click to toggle source
# File lib/chimera_http_client/response.rb, line 22 def error? false end
parsed_body()
click to toggle source
# File lib/chimera_http_client/response.rb, line 14 def parsed_body deserializer.call(body) end
success?()
click to toggle source
# File lib/chimera_http_client/response.rb, line 18 def success? response.success? end