Module: HTTPX::Plugins::Proxy::OptionsMethods
- Defined in:
- lib/httpx/plugins/proxy.rb
Overview
adds support for the following options:
- :proxy
-
proxy options defining :uri, :username, :password or :scheme (i.e.
{ uri: "http://proxy" })
Instance Method Summary collapse
Instance Method Details
#option_proxy(value) ⇒ Object
97 98 99 |
# File 'lib/httpx/plugins/proxy.rb', line 97 def option_proxy(value) value.is_a?(Parameters) ? value : Hash[value] end |
#option_supported_proxy_protocols(value) ⇒ Object
101 102 103 104 105 |
# File 'lib/httpx/plugins/proxy.rb', line 101 def option_supported_proxy_protocols(value) raise TypeError, ":supported_proxy_protocols must be an Array" unless value.is_a?(Array) value.map(&:to_s) end |