Merge pull request #175 from Christian-G/master
Added HTTP Proxy support
This commit is contained in:
commit
3a295bf0e7
|
@ -97,6 +97,9 @@ module Google
|
||||||
else
|
else
|
||||||
logger.warn { "#{self.class} - Please provide :application_name and :application_version when initializing the client" }
|
logger.warn { "#{self.class} - Please provide :application_name and :application_version when initializing the client" }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
proxy = options[:proxy] || Object::ENV["http_proxy"]
|
||||||
|
|
||||||
self.user_agent = options[:user_agent] || (
|
self.user_agent = options[:user_agent] || (
|
||||||
"#{application_string} " +
|
"#{application_string} " +
|
||||||
"google-api-ruby-client/#{Google::APIClient::VERSION::STRING} #{ENV::OS_VERSION} (gzip)"
|
"google-api-ruby-client/#{Google::APIClient::VERSION::STRING} #{ENV::OS_VERSION} (gzip)"
|
||||||
|
@ -118,6 +121,7 @@ module Google
|
||||||
faraday.options.params_encoder = Faraday::FlatParamsEncoder
|
faraday.options.params_encoder = Faraday::FlatParamsEncoder
|
||||||
faraday.ssl.ca_file = ca_file
|
faraday.ssl.ca_file = ca_file
|
||||||
faraday.ssl.verify = true
|
faraday.ssl.verify = true
|
||||||
|
faraday.proxy proxy
|
||||||
faraday.adapter Faraday.default_adapter
|
faraday.adapter Faraday.default_adapter
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
|
|
Loading…
Reference in New Issue