Class: NewRelic::Agent::HTTPClients::AsyncHTTPRequest
Constant Summary
collapse
- ASYNC_HTTP =
'Async::HTTP'
NewRelic::Agent::HTTPClients::AbstractRequest::COLON, NewRelic::Agent::HTTPClients::AbstractRequest::LHOST, NewRelic::Agent::HTTPClients::AbstractRequest::UHOST
Instance Method Summary
collapse
Constructor Details
#initialize(connection, method, url, headers) ⇒ AsyncHTTPRequest
Returns a new instance of AsyncHTTPRequest.
Instance Method Details
#[](key) ⇒ Object
49
50
51
52
53
54
55
56
|
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 49
def [](key)
return [key] unless .is_a?(Array)
.each do ||
return [1] if [0].casecmp?(key)
end
nil
end
|
#[]=(key, value) ⇒ Object
58
59
60
61
62
63
64
|
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 58
def []=(key, value)
if .is_a?(Array)
<< [key, value]
else
[key] = value
end
end
|
70
71
72
|
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 70
def
@headers
end
|
#host ⇒ Object
45
46
47
|
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 45
def host
|| uri.host.to_s
end
|
39
40
41
42
43
|
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 39
def
if hostname = (self[LHOST] || self[UHOST])
hostname.split(COLON).first
end
end
|
#method ⇒ Object
74
75
76
|
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 74
def method
@method
end
|
#type ⇒ Object
35
36
37
|
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 35
def type
ASYNC_HTTP
end
|
#uri ⇒ Object
66
67
68
|
# File 'lib/new_relic/agent/http_clients/async_http_wrappers.rb', line 66
def uri
@url
end
|