Class: NewRelic::Agent::HTTPClients::AsyncHTTPResponse

Inherits:
AbstractResponse show all
Defined in:
lib/new_relic/agent/http_clients/async_http_wrappers.rb

Instance Method Summary collapse

Methods inherited from AbstractResponse

#has_status_code?, #initialize, #status_code

Constructor Details

This class inherits a constructor from NewRelic::Agent::HTTPClients::AbstractResponse

Instance Method Details

#[](key) ⇒ Object



16
17
18
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 16

def [](key)
  to_hash[key.downcase]&.first
end

#get_status_codeObject



12
13
14
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 12

def get_status_code
  get_status_code_using(:status)
end

#to_hashObject



20
21
22
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 20

def to_hash
  @wrapped_response.headers.to_h
end