Class: Coinbase::Exchange::NetHTTPResponse
Overview
Instance Attribute Summary
Attributes inherited from APIResponse
#received_at
Instance Method Summary
collapse
Methods inherited from APIResponse
#initialize, #raw
Instance Method Details
#body ⇒ Object
51
52
53
|
# File 'lib/coinbase/exchange/adapters/net_http.rb', line 51
def body
@response.body
end
|
55
56
57
58
59
60
|
# File 'lib/coinbase/exchange/adapters/net_http.rb', line 55
def
out = @response.to_hash.map do |key, val|
[ key.upcase.gsub('_', '-'), val.count == 1 ? val.first : val ]
end
out.to_h
end
|
#status ⇒ Object
62
63
64
|
# File 'lib/coinbase/exchange/adapters/net_http.rb', line 62
def status
@response.code.to_i
end
|