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

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

Instance Method Summary collapse

Instance Method Details

#call(context) ⇒ Object



13
14
15
16
17
18
19
20
# File '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