Class: Datadog::Transport::HTTP::Env
- Inherits:
-
Hash
- Object
- Hash
- Datadog::Transport::HTTP::Env
- Defined in:
- lib/ddtrace/transport/http/env.rb
Overview
Data structure for an HTTP request
Instance Attribute Summary collapse
-
#request ⇒ Object
readonly
Returns the value of attribute request.
Instance Method Summary collapse
- #body ⇒ Object
- #body=(value) ⇒ Object
- #headers ⇒ Object
- #headers=(value) ⇒ Object
-
#initialize(request, options = nil) ⇒ Env
constructor
A new instance of Env.
- #path ⇒ Object
- #path=(value) ⇒ Object
- #verb ⇒ Object
- #verb=(value) ⇒ Object
Constructor Details
#initialize(request, options = nil) ⇒ Env
Returns a new instance of Env.
9 10 11 12 |
# File 'lib/ddtrace/transport/http/env.rb', line 9 def initialize(request, = nil) @request = request merge!() unless .nil? end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
6 7 8 |
# File 'lib/ddtrace/transport/http/env.rb', line 6 def request @request end |
Instance Method Details
#body ⇒ Object
30 31 32 |
# File 'lib/ddtrace/transport/http/env.rb', line 30 def body self[:body] end |
#body=(value) ⇒ Object
34 35 36 |
# File 'lib/ddtrace/transport/http/env.rb', line 34 def body=(value) self[:body] = value end |
#headers ⇒ Object
38 39 40 |
# File 'lib/ddtrace/transport/http/env.rb', line 38 def headers self[:headers] ||= {} end |
#headers=(value) ⇒ Object
42 43 44 |
# File 'lib/ddtrace/transport/http/env.rb', line 42 def headers=(value) self[:headers] = value end |
#path ⇒ Object
22 23 24 |
# File 'lib/ddtrace/transport/http/env.rb', line 22 def path self[:path] end |
#path=(value) ⇒ Object
26 27 28 |
# File 'lib/ddtrace/transport/http/env.rb', line 26 def path=(value) self[:path] = value end |
#verb ⇒ Object
14 15 16 |
# File 'lib/ddtrace/transport/http/env.rb', line 14 def verb self[:verb] end |
#verb=(value) ⇒ Object
18 19 20 |
# File 'lib/ddtrace/transport/http/env.rb', line 18 def verb=(value) self[:verb] = value end |