Class: NewRelic::Agent::HTTPClients::HTTPClientResponse

Inherits:
AbstractResponse show all
Defined in:
lib/new_relic/agent/http_clients/httpclient_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
15
16
17
18
# File 'lib/new_relic/agent/http_clients/httpclient_wrappers.rb', line 11

def [](key)
  @wrapped_response.headers.each do |k, v|
    if key.casecmp(k) == 0
      return v
    end
  end
  nil
end

#to_hashObject



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

def to_hash
  @wrapped_response.headers
end