[core] Adds fog User-Agent header
As discussed in #1026 this adds a User Agent HTTP header to help identify the version of fog is accessing APIs.
This commit is contained in:
parent
043b549eed
commit
a07f3203a6
|
@ -2,6 +2,7 @@ module Fog
|
|||
class Connection
|
||||
|
||||
def initialize(url, persistent=false, params={})
|
||||
Excon.defaults[:headers]['User-Agent'] ||= "fog/#{Fog::VERSION}"
|
||||
@excon = Excon.new(url, params)
|
||||
@persistent = persistent
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue