class NewRelic::Agent::HTTPClients::HTTPRequest
Constants
- HTTP_RB
Public Class Methods
new(wrapped_request)
click to toggle source
# File lib/new_relic/agent/http_clients/http_rb_wrappers.rb, line 24 def initialize(wrapped_request) @wrapped_request = wrapped_request end
Public Instance Methods
[](key)
click to toggle source
# File lib/new_relic/agent/http_clients/http_rb_wrappers.rb, line 50 def [](key) @wrapped_request.headers[key] end
[]=(key, value)
click to toggle source
# File lib/new_relic/agent/http_clients/http_rb_wrappers.rb, line 54 def []=(key, value) @wrapped_request.headers[key] = value end
headers()
click to toggle source
# File lib/new_relic/agent/http_clients/http_rb_wrappers.rb, line 58 def headers @wrapped_request.headers.to_hash end
host()
click to toggle source
# File lib/new_relic/agent/http_clients/http_rb_wrappers.rb, line 42 def host host_from_header || @wrapped_request.host end
host_from_header()
click to toggle source
# File lib/new_relic/agent/http_clients/http_rb_wrappers.rb, line 36 def host_from_header if hostname = self[LHOST] hostname.split(COLON).first end end
method()
click to toggle source
# File lib/new_relic/agent/http_clients/http_rb_wrappers.rb, line 46 def method @wrapped_request.verb.upcase end
type()
click to toggle source
# File lib/new_relic/agent/http_clients/http_rb_wrappers.rb, line 32 def type HTTP_RB end
uri()
click to toggle source
# File lib/new_relic/agent/http_clients/http_rb_wrappers.rb, line 28 def uri @uri ||= URIUtil.parse_and_normalize_url(@wrapped_request.uri) end