Class: Coinbasepro::Api::EMHTTPResponse

Inherits:
APIResponse show all
Defined in:
lib/coinbasepro/api/adapters/em_http.rb

Overview

EM-Http response object

Instance Attribute Summary

Attributes inherited from APIResponse

#received_at

Instance Method Summary collapse

Methods inherited from APIResponse

#initialize, #raw

Constructor Details

This class inherits a constructor from Coinbasepro::Api::APIResponse

Instance Method Details

#bodyObject



67
68
69
# File 'lib/coinbasepro/api/adapters/em_http.rb', line 67

def body
  @response.response
end

#headersObject



71
72
73
74
75
76
# File 'lib/coinbasepro/api/adapters/em_http.rb', line 71

def headers
  out = @response.response_header.map do |key, val|
    [ key.upcase.gsub('_', '-'), val ]
  end
  out.to_h
end

#statusObject



78
79
80
# File 'lib/coinbasepro/api/adapters/em_http.rb', line 78

def status
  @response.response_header.status
end