Class: Aws::Plugins::Protocols::ApiGateway::ContentTypeHandler Private
- Inherits:
-
Seahorse::Client::Handler
- Object
- Seahorse::Client::Handler
- Aws::Plugins::Protocols::ApiGateway::ContentTypeHandler
- Defined in:
- lib/aws-sdk-core/plugins/protocols/api_gateway.rb
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.
Instance Attribute Summary
Attributes inherited from Seahorse::Client::Handler
Instance Method Summary collapse
- #call(context) ⇒ Object private
Methods inherited from Seahorse::Client::Handler
Constructor Details
This class inherits a constructor from Seahorse::Client::Handler
Instance Method Details
#call(context) ⇒ 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.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/aws-sdk-core/plugins/protocols/api_gateway.rb', line 9 def call(context) body = context.http_request.body # Rest::Handler will set a default JSON body, so size can be checked # if this handler is run after serialization. if !body.respond_to?(:size) || (body.respond_to?(:size) && body.size > 0) context.http_request.headers['Content-Type'] ||= 'application/json' end @handler.call(context) end |