class NewRelic::Agent::HTTPClients::HTTPXHTTPRequest
Constants
- DEFAULT_HOST
- TYPE
Attributes
uri[R]
Public Class Methods
new(request)
click to toggle source
# File lib/new_relic/agent/http_clients/httpx_wrappers.rb, line 56 def initialize(request) @request = request @uri = request.uri end
Public Instance Methods
[](key)
click to toggle source
# File lib/new_relic/agent/http_clients/httpx_wrappers.rb, line 85 def [](key) @request.headers[key] end
[]=(key, value)
click to toggle source
# File lib/new_relic/agent/http_clients/httpx_wrappers.rb, line 77 def []=(key, value) @request.headers[key] = value end
headers()
click to toggle source
# File lib/new_relic/agent/http_clients/httpx_wrappers.rb, line 81 def headers @request.headers end
host()
click to toggle source
# File lib/new_relic/agent/http_clients/httpx_wrappers.rb, line 69 def host host_from_header || uri.host&.downcase || DEFAULT_HOST end
host_from_header()
click to toggle source
# File lib/new_relic/agent/http_clients/httpx_wrappers.rb, line 65 def host_from_header self[LHOST] || self[UHOST] end
method()
click to toggle source
# File lib/new_relic/agent/http_clients/httpx_wrappers.rb, line 73 def method @request.verb end
type()
click to toggle source
# File lib/new_relic/agent/http_clients/httpx_wrappers.rb, line 61 def type TYPE end