Sha256: fd0d2eaf1dd68bd79ffce80a02b14872ffa059ac7ef661f137395b0eeaf4c79b

Contents?: true

Size: 745 Bytes

Versions: 17

Compression:

Stored size: 745 Bytes

Contents

# frozen_string_literal: true

module Aws
  module SSO
    module Plugins
      class ContentType < Seahorse::Client::Plugin

        def add_handlers(handlers, config)
          handlers.add(Handler)
        end

        class Handler < Seahorse::Client::Handler
          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/json'
            @handler.call(context)
          end
        end
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
aws-sdk-core-3.121.1 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.121.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.120.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.119.1 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.119.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.118.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.117.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.116.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.115.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.114.3 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.114.2 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.114.1 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.114.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.113.1 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.113.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.112.1 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.112.0 lib/aws-sdk-sso/plugins/content_type.rb