mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[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 revised version fixes issue #1310
This commit is contained in:
parent
28a3e59245
commit
70d2b9caa6
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue