class NewRelic::Agent::HTTPClients::CurbResponse
Public Class Methods
new(wrapped_response)
click to toggle source
Calls superclass method
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 51 def initialize(wrapped_response) super(wrapped_response) @headers = {} end
Public Instance Methods
[](key)
click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 56 def [](key) @headers[key.downcase] end
append_header_data(data)
click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 64 def append_header_data(data) key, value = data.split(/:\s*/, 2) @headers[key.downcase] = value @wrapped_response._nr_header_str ||= +'' @wrapped_response._nr_header_str << data end
to_hash()
click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 60 def to_hash @headers.dup end
Private Instance Methods
get_status_code()
click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 73 def get_status_code get_status_code_using(:response_code) end