class Aws::Plugins::Protocols::ApiGateway::ContentTypeHandler
Public Instance Methods
call(context)
click to toggle source
# File lib/aws-sdk-core/plugins/protocols/api_gateway.rb, line 11 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