Class: Datadog::CI::Transport::Api::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/ci/transport/api/base.rb

Direct Known Subclasses

CiTestCycle, EvpProxy

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(http:) ⇒ Base

Returns a new instance of Base.



12
13
14
# File 'lib/datadog/ci/transport/api/base.rb', line 12

def initialize(http:)
  @http = http
end

Instance Attribute Details

#httpObject (readonly)

Returns the value of attribute http.



10
11
12
# File 'lib/datadog/ci/transport/api/base.rb', line 10

def http
  @http
end

Instance Method Details

#request(path:, payload:, verb: "post") ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/datadog/ci/transport/api/base.rb', line 16

def request(path:, payload:, verb: "post")
  http.request(
    path: path,
    payload: payload,
    verb: verb,
    headers: headers
  )
end