class NewRelic::Agent::HTTPClients::CurbResponse

Public Class Methods

new(curlobj) click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 41
def initialize(curlobj)
  @headers = {}
  @curlobj = curlobj
end

Public Instance Methods

[](key) click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 46
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 54
def append_header_data( data )
  key, value = data.split( /:\s*/, 2 )
  @headers[ key.downcase ] = value
  @curlobj._nr_header_str ||= ''
  @curlobj._nr_header_str << data
end
to_hash() click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 50
def to_hash
  @headers.dup
end