Class: Datadog::Core::Transport::HTTP::Env
- Inherits:
-
Hash
- Object
- Hash
- Datadog::Core::Transport::HTTP::Env
- Defined in:
- lib/datadog/core/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
- #form ⇒ Object
- #form=(value) ⇒ Object
- #headers ⇒ Object
- #headers=(value) ⇒ Object
-
#initialize(request, options = nil) ⇒ Env
constructor
rubocop:disable Lint/MissingSuper.
- #path ⇒ Object
- #path=(value) ⇒ Object
-
#verb ⇒ Object
rubocop:enable Lint/MissingSuper.
- #verb=(value) ⇒ Object
Constructor Details
#initialize(request, options = nil) ⇒ Env
rubocop:disable Lint/MissingSuper
13 14 15 16 |
# File 'lib/datadog/core/transport/http/env.rb', line 13 def initialize(request, = nil) @request = request merge!() unless .nil? end |
Instance Attribute Details
#request ⇒ Object (readonly)
Returns the value of attribute request.
9 10 11 |
# File 'lib/datadog/core/transport/http/env.rb', line 9 def request @request end |
Instance Method Details
#body ⇒ Object
35 36 37 |
# File 'lib/datadog/core/transport/http/env.rb', line 35 def body self[:body] end |
#body=(value) ⇒ Object
39 40 41 |
# File 'lib/datadog/core/transport/http/env.rb', line 39 def body=(value) self[:body] = value end |
#form ⇒ Object
51 52 53 |
# File 'lib/datadog/core/transport/http/env.rb', line 51 def form self[:form] ||= {} end |
#form=(value) ⇒ Object
55 56 57 |
# File 'lib/datadog/core/transport/http/env.rb', line 55 def form=(value) self[:form] = value end |
#headers ⇒ Object
43 44 45 |
# File 'lib/datadog/core/transport/http/env.rb', line 43 def headers self[:headers] ||= {} end |
#headers=(value) ⇒ Object
47 48 49 |
# File 'lib/datadog/core/transport/http/env.rb', line 47 def headers=(value) self[:headers] = value end |
#path ⇒ Object
27 28 29 |
# File 'lib/datadog/core/transport/http/env.rb', line 27 def path self[:path] end |
#path=(value) ⇒ Object
31 32 33 |
# File 'lib/datadog/core/transport/http/env.rb', line 31 def path=(value) self[:path] = value end |
#verb ⇒ Object
rubocop:enable Lint/MissingSuper
19 20 21 |
# File 'lib/datadog/core/transport/http/env.rb', line 19 def verb self[:verb] end |
#verb=(value) ⇒ Object
23 24 25 |
# File 'lib/datadog/core/transport/http/env.rb', line 23 def verb=(value) self[:verb] = value end |