Class: Aws::FinSpaceData::Plugins::ContentType::Handler

Inherits:
Seahorse::Client::Handler show all
Defined in:
gems/aws-sdk-finspacedata/lib/aws-sdk-finspacedata/plugins/content_type.rb

Instance Attribute Summary

Attributes inherited from Seahorse::Client::Handler

#handler

Instance Method Summary collapse

Methods inherited from Seahorse::Client::Handler

#initialize, #inspect

Constructor Details

This class inherits a constructor from Seahorse::Client::Handler

Instance Method Details

#call(context) ⇒ Object



13
14
15
16
17
18
19
20
# File 'gems/aws-sdk-finspacedata/lib/aws-sdk-finspacedata/plugins/content_type.rb', line 13

def call(context)
  # Some operations break when given an empty content-type header.
  # The SDK adds this blank content-type header
  # since Net::HTTP provides a default that can break services.
  # We're setting one here even though it's not used or necessary.
  context.http_request.headers['content-type'] = 'application/x-amz-json-1.1'
  @handler.call(context)
end