We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da31cd1 commit 0d0ea03Copy full SHA for 0d0ea03
lib/telegram/bot/client.rb
@@ -53,6 +53,9 @@ def error_for_response(response)
53
54
def initialize(token = nil, username = nil, **options)
55
@client = HTTPClient.new
56
+ if ENV['HTTP_PROXY']
57
+ @client.set_proxy_auth(ENV['HTTP_PROXY_USER'], ENV['HTTP_PROXY_PASSWORD'])
58
+ end
59
@token = token || options[:token]
60
@username = username || options[:username]
61
@base_uri = format(URL_TEMPLATE, token: self.token)
0 commit comments