class SnapAPIClient::Response
Response
¶ ↑
Wrapper for an HTTP response.
Attributes
response[R]
Public Class Methods
new(response)
click to toggle source
# File lib/snap_api_client/response.rb, line 12 def initialize(response) @response = response end
Public Instance Methods
body_json()
click to toggle source
# File lib/snap_api_client/response.rb, line 20 def body_json JSON.parse(response.body) end
code()
click to toggle source
# File lib/snap_api_client/response.rb, line 16 def code response.status.code end