class DeviceCloud::Response

Attributes

body[R]
code[R]
headers[R]
message[R]
original_response[R]

Public Class Methods

new(http_response) click to toggle source
# File lib/device_cloud/response.rb, line 5
def initialize(http_response)
  @original_response = http_response
  @code = original_response.code
  @message = original_response.message
  @headers = original_response.header.to_hash
  @body = original_response.body
end

Public Instance Methods

to_hash_from_json() click to toggle source
# File lib/device_cloud/response.rb, line 13
def to_hash_from_json
  JSON.parse(body)
end