Sha256: e378557521ceea78c85c594eb004058e6ed6b37175ed99ef6611995dbc2d7a8f
Contents?: true
Size: 767 Bytes
Versions: 7
Compression:
Stored size: 767 Bytes
Contents
# frozen_string_literal: true module Aws module LookoutMetrics 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/x-amz-json-1.1' @handler.call(context) end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems