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

Inherits:
Hash
  • Object
show all
Defined in:
lib/ddtrace/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

Returns a new instance of Env.



9
10
11
12
# File 'lib/ddtrace/transport/http/env.rb', line 9

def initialize(request, options = nil)
  @request = request
  merge!(options) unless options.nil?
end

Instance Attribute Details

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

#bodyObject



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

#headersObject



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

#pathObject



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

#verbObject



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