class NewRelic::Agent::HTTPClients::ExconHTTPRequest
Attributes
host[R]
method[R]
Public Class Methods
new(datum)
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 29 def initialize(datum) @datum = datum @method = @datum[:method].to_s.upcase @scheme = @datum[:scheme] @port = @datum[:port] @path = @datum[:path] headers = @datum[:headers] if hostname = (headers['host'] || headers['Host']) @host = hostname.split(':').first else @host = @datum[:host] end end
Public Instance Methods
[](key)
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 51 def [](key) @datum[:headers][key] end
[]=(key, value)
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 55 def []=(key, value) @datum[:headers] ||= {} @datum[:headers][key] = value end
type()
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 47 def type "Excon" end
uri()
click to toggle source
# File lib/new_relic/agent/http_clients/excon_wrappers.rb, line 60 def uri URI.parse("#{@scheme}://#{@host}:#{@port}#{@path}") end