Method: HttpUtilities::Http::ProxySupport#generate_proxy_options
- Defined in:
- lib/http_utilities/http/proxy_support.rb
#generate_proxy_options ⇒ Object
81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/http_utilities/http/proxy_support.rb', line 81 def = {} if self.proxy && !self.proxy[:host].to_s.empty? && !self.proxy[:port].to_s.empty? [:uri] = "http://#{self.proxy[:host]}:#{self.proxy[:port]}" [:user] = self.proxy[:username] if !self.proxy[:username].to_s.empty? [:password] = self.proxy[:password] if !self.proxy[:password].to_s.empty? end return end |