Class: Datadog::DataStreams::Transport::HTTP::Stats::API::Endpoint
- Inherits:
-
Core::Transport::HTTP::API::Endpoint
- Object
- Core::Transport::HTTP::API::Endpoint
- Datadog::DataStreams::Transport::HTTP::Stats::API::Endpoint
- Defined in:
- lib/datadog/data_streams/transport/http/stats.rb
Overview
Endpoint for submitting DSM stats data
Instance Attribute Summary
Attributes inherited from Core::Transport::HTTP::API::Endpoint
Instance Method Summary collapse
- #call(env, &block) ⇒ Object
- #encoder ⇒ Object
-
#initialize(path) ⇒ Endpoint
constructor
A new instance of Endpoint.
Constructor Details
#initialize(path) ⇒ Endpoint
Returns a new instance of Endpoint.
25 26 27 |
# File 'lib/datadog/data_streams/transport/http/stats.rb', line 25 def initialize(path) super(:post, path) end |
Instance Method Details
#call(env, &block) ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/datadog/data_streams/transport/http/stats.rb', line 29 def call(env, &block) # Build request env.verb = verb env.path = path env.body = env.request.parcel.data # Send request http_response = yield(env) # Build response Response.new(http_response) end |
#encoder ⇒ Object
42 43 44 45 |
# File 'lib/datadog/data_streams/transport/http/stats.rb', line 42 def encoder # DSM handles encoding in the transport layer nil end |