AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Class: Aws::Finspace::Plugins::ContentType::Handler

Inherits:
Seahorse::Client::Handler show all
Defined in:
gems/aws-sdk-finspace/lib/aws-sdk-finspace/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-finspace/lib/aws-sdk-finspace/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