Class: NewRelic::Agent::HTTPClients::HTTPResponse

Inherits:
AbstractResponse show all
Defined in:
lib/new_relic/agent/http_clients/http_rb_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



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

def [](key)
  _, value = @wrapped_response.headers.find { |k, _| key.casecmp(k) == 0 }
  value unless value.nil?
end

#to_hashObject



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

def to_hash
  @wrapped_response.headers
end