Class: NewRelic::Agent::HTTPClients::HTTPXHTTPRequest
Constant Summary
collapse
- DEFAULT_HOST =
'UNKNOWN_HOST'
- TYPE =
'HTTPX'
AbstractRequest::COLON, AbstractRequest::LHOST, AbstractRequest::UHOST
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of HTTPXHTTPRequest.
56
57
58
59
|
# File 'lib/new_relic/agent/http_clients/httpx_wrappers.rb', line 56
def initialize(request)
@request = request
@uri = request.uri
end
|
Instance Attribute Details
#uri ⇒ Object
Returns the value of attribute uri.
51
52
53
|
# File 'lib/new_relic/agent/http_clients/httpx_wrappers.rb', line 51
def uri
@uri
end
|
Instance Method Details
#[](key) ⇒ Object
85
86
87
|
# File 'lib/new_relic/agent/http_clients/httpx_wrappers.rb', line 85
def [](key)
@request.[key]
end
|
#[]=(key, value) ⇒ Object
77
78
79
|
# File 'lib/new_relic/agent/http_clients/httpx_wrappers.rb', line 77
def []=(key, value)
@request.[key] = value
end
|
81
82
83
|
# File 'lib/new_relic/agent/http_clients/httpx_wrappers.rb', line 81
def
@request.
end
|
#host ⇒ Object
69
70
71
|
# File 'lib/new_relic/agent/http_clients/httpx_wrappers.rb', line 69
def host
|| uri.host&.downcase || DEFAULT_HOST
end
|
65
66
67
|
# File 'lib/new_relic/agent/http_clients/httpx_wrappers.rb', line 65
def
self[LHOST] || self[UHOST]
end
|
#method ⇒ Object
73
74
75
|
# File 'lib/new_relic/agent/http_clients/httpx_wrappers.rb', line 73
def method
@request.verb
end
|
#type ⇒ Object
61
62
63
|
# File 'lib/new_relic/agent/http_clients/httpx_wrappers.rb', line 61
def type
TYPE
end
|