class Polyseerio::Response
HTTP response wrapper.
Attributes
rest_response[RW]
Public Class Methods
new(rest_response)
click to toggle source
# File lib/response.rb, line 7 def initialize(rest_response) @rest_response = rest_response end
Public Instance Methods
body()
click to toggle source
Returns the response body.
NOTE: This function is memoized.
# File lib/response.rb, line 14 def body @body_result ||= JSON.parse(@rest_response.body, symbolize_names: true) end
request()
click to toggle source
Returns the original request obect.
# File lib/response.rb, line 19 def request @rest_response.request end