class NewRelic::Agent::HTTPClients::ExconHTTPRequest
Constants
- EXCON
Attributes
method[R]
Public Class Methods
new(datum)
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 51 def initialize(datum) @datum = datum @method = @datum[:method].to_s.upcase @scheme = @datum[:scheme] @port = @datum[:port] @path = @datum[:path] end
Public Instance Methods
[](key)
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 74 def [](key) headers[key] end
[]=(key, value)
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 78 def []=(key, value) headers[key] = value end
headers()
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 87 def headers @datum[:headers] end
host()
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 70 def host host_from_header || @datum[:host] end
host_from_header()
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 64 def host_from_header if hostname = (headers[LHOST] || headers[UHOST]) hostname.split(COLON).first end end
type()
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 60 def type EXCON end
uri()
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 82 def uri url = "#{@scheme}://#{host}:#{@port}#{@path}" URIUtil.parse_and_normalize_url(url) end