Class: Datadog::Core::Transport::HTTP::Env

Inherits:
Hash
  • Object
show all
Defined in:
lib/datadog/core/transport/http/env.rb

Overview

Data structure for an HTTP request

Instance Attribute Summary collapse

Instance Method Summary collapse

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, options = nil)
  @request = request
  merge!(options) unless options.nil?
end

Instance Attribute Details

#requestObject (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

#bodyObject



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

#formObject



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

#headersObject



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

#pathObject



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

#verbObject

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