class NewRelic::Agent::HTTPClients::CurbRequest

Constants

CURB

Public Class Methods

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

Public Instance Methods

[](key) click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 33
def [](key)
  headers[key]
end
[]=(key, value) click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 37
def []=(key, value)
  headers[key] = value
end
headers() click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 45
def headers
  @curlobj.headers
end
host() click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 25
def host
  host_from_header || self.uri.host
end
host_from_header() click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 21
def host_from_header
  self[LHOST] || self[UHOST]
end
method() click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 29
def method
  @curlobj._nr_http_verb
end
type() click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 17
def type
  CURB
end
uri() click to toggle source
# File lib/new_relic/agent/http_clients/curb_wrappers.rb, line 41
def uri
  @uri ||= URIUtil.parse_and_normalize_url(@curlobj.url)
end