Class: Datadog::DI::Transport::HTTP::Input::API::Endpoint Private
- Inherits:
-
Core::Transport::HTTP::API::Endpoint
- Object
- Core::Transport::HTTP::API::Endpoint
- Datadog::DI::Transport::HTTP::Input::API::Endpoint
- Defined in:
- lib/datadog/di/transport/http/input.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Endpoint for negotiation
Constant Summary collapse
- HEADER_CONTENT_TYPE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'Content-Type'
Instance Attribute Summary collapse
- #encoder ⇒ Object readonly private
Attributes inherited from Core::Transport::HTTP::API::Endpoint
Instance Method Summary collapse
- #call(env, &block) ⇒ Object private
-
#initialize(path, encoder) ⇒ Endpoint
constructor
private
A new instance of Endpoint.
Constructor Details
#initialize(path, encoder) ⇒ Endpoint
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Endpoint.
48 49 50 51 |
# File 'lib/datadog/di/transport/http/input.rb', line 48 def initialize(path, encoder) super(:post, path) @encoder = encoder end |
Instance Attribute Details
#encoder ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
45 46 47 |
# File 'lib/datadog/di/transport/http/input.rb', line 45 def encoder @encoder end |
Instance Method Details
#call(env, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
53 54 55 56 57 58 59 |
# File 'lib/datadog/di/transport/http/input.rb', line 53 def call(env, &block) # Encode body & type env.headers[HEADER_CONTENT_TYPE] = encoder.content_type env.body = env.request.parcel.data super end |