Sha256: 60aa996fdc42b64b00bcfa0a783f84eeb4ec6eec47060e7b6b9345355dc83964
Contents?: true
Size: 712 Bytes
Versions: 12
Compression:
Stored size: 712 Bytes
Contents
module Aws module Plugins class UserAgent < Seahorse::Client::Plugin option(:user_agent_suffix) # @api private class Handler < Seahorse::Client::Handler def call(context) set_user_agent(context) @handler.call(context) end def set_user_agent(context) ua = "aws-sdk-ruby2/#{VERSION} %s/%s %s Seahorse/%s %s" % [ (RUBY_ENGINE rescue nil or "ruby"), RUBY_VERSION, RUBY_PLATFORM, Seahorse::VERSION, context.config.user_agent_suffix, ] context.http_request.headers['User-Agent'] = ua.strip end end handler(Handler) end end end
Version data entries
12 entries across 12 versions & 1 rubygems