diff --git a/lib/faraday/connection.rb b/lib/faraday/connection.rb index 76ab8c20..2d93d387 100644 --- a/lib/faraday/connection.rb +++ b/lib/faraday/connection.rb @@ -82,6 +82,8 @@ module Faraday proxy(options.fetch(:proxy) { ENV['http_proxy'] }) yield self if block_given? + + @headers[:user_agent] ||= "Faraday v#{VERSION}" end # Public: Sets the Hash of URI query unencoded key/value pairs.