@param [Seahorse::Client::RequestContext] context @return [Seahorse::Client::Response]
# File lib/aws-sdk-core/json/rpc_headers_handler.rb, line 9 def call(context) @handler.call(add_headers(context)) end
# File lib/aws-sdk-core/json/rpc_headers_handler.rb, line 15 def add_headers(context) context.http_request.headers['Content-Type'] = content_type(context) context.http_request.headers['X-Amz-Target'] = target(context) context end
# File lib/aws-sdk-core/json/rpc_headers_handler.rb, line 21 def content_type(context) CONTENT_TYPE % [context.config.api.metadata('jsonVersion')] end
# File lib/aws-sdk-core/json/rpc_headers_handler.rb, line 25 def target(context) prefix = context.config.api.metadata('targetPrefix') "#{prefix}.#{context.operation.name}" end