class Response
HTTP response
Attributes
headers[R]
status_code[R]
Public Class Methods
new(adapter, status_code, headers)
click to toggle source
# File lib/polyphony/http/client/response.rb, line 11 def initialize(adapter, status_code, headers) @adapter = adapter @status_code = status_code @headers = headers end
Public Instance Methods
body()
click to toggle source
# File lib/polyphony/http/client/response.rb, line 17 def body @body ||= @adapter.body end
each_chunk(&block)
click to toggle source
# File lib/polyphony/http/client/response.rb, line 21 def each_chunk(&block) @adapter.each_chunk(&block) end
json()
click to toggle source
# File lib/polyphony/http/client/response.rb, line 29 def json @json ||= ::JSON.parse(body) end
next_body_chunk()
click to toggle source
# File lib/polyphony/http/client/response.rb, line 25 def next_body_chunk @adapter.next_body_chunk end