Class: NewRelic::Agent::HTTPClients::ExconHTTPRequest
- Inherits:
-
Object
- Object
- NewRelic::Agent::HTTPClients::ExconHTTPRequest
- Defined in:
- lib/new_relic/agent/http_clients/excon_wrappers.rb
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #host ⇒ Object
-
#initialize(datum) ⇒ ExconHTTPRequest
constructor
A new instance of ExconHTTPRequest.
- #method ⇒ Object
- #type ⇒ Object
- #uri ⇒ Object
Constructor Details
#initialize(datum) ⇒ ExconHTTPRequest
Returns a new instance of ExconHTTPRequest.
30 31 32 |
# File 'lib/new_relic/agent/http_clients/excon_wrappers.rb', line 30 def initialize(datum) @datum = datum end |
Instance Method Details
#[](key) ⇒ Object
46 47 48 |
# File 'lib/new_relic/agent/http_clients/excon_wrappers.rb', line 46 def [](key) @datum[:headers][key] end |
#[]=(key, value) ⇒ Object
50 51 52 53 |
# File 'lib/new_relic/agent/http_clients/excon_wrappers.rb', line 50 def []=(key, value) @datum[:headers] ||= {} @datum[:headers][key] = value end |
#host ⇒ Object
38 39 40 |
# File 'lib/new_relic/agent/http_clients/excon_wrappers.rb', line 38 def host @datum[:host] end |
#method ⇒ Object
42 43 44 |
# File 'lib/new_relic/agent/http_clients/excon_wrappers.rb', line 42 def method @datum[:method].to_s.upcase end |
#type ⇒ Object
34 35 36 |
# File 'lib/new_relic/agent/http_clients/excon_wrappers.rb', line 34 def type "Excon" end |
#uri ⇒ Object
55 56 57 |
# File 'lib/new_relic/agent/http_clients/excon_wrappers.rb', line 55 def uri URI.parse("#{@datum[:scheme]}://#{@datum[:host]}:#{@datum[:port]}#{@datum[:path]}") end |