Class: Datadog::CI::Transport::Api::Base
- Inherits:
-
Object
- Object
- Datadog::CI::Transport::Api::Base
- Defined in:
- lib/datadog/ci/transport/api/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#http ⇒ Object
readonly
Returns the value of attribute http.
Instance Method Summary collapse
-
#initialize(http:) ⇒ Base
constructor
A new instance of Base.
- #request(path:, payload:, verb: "post") ⇒ Object
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
#http ⇒ Object (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 |