Sha256: 4f1d8d25892d4bdce1450ffccdf46d617375955ac633250a98aa364e7b8062ab

Contents?: true

Size: 749 Bytes

Versions: 12

Compression:

Stored size: 749 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 SSO 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

12 entries across 12 versions & 2 rubygems

Version Path
aws-sdk-core-3.111.2 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.111.1 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.111.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.110.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.109.3 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.109.2 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.109.1 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.109.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.108.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.107.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-core-3.105.0 lib/aws-sdk-sso/plugins/content_type.rb
aws-sdk-sso-1.6.0 lib/aws-sdk-sso/plugins/content_type.rb