class Faraday::ProxyOptions
ProxyOptions
contains the configurable properties for the proxy configuration used when making an HTTP request.
Public Class Methods
from(value)
click to toggle source
Calls superclass method
# File lib/faraday/options/proxy_options.rb, line 11 def self.from(value) case value when String # URIs without a scheme should default to http (like 'example:123'). # This fixes #1282 and prevents a silent failure in some adapters. value = "http://#{value}" unless value.include?('://') value = { uri: Utils.URI(value) } when URI value = { uri: value } when Hash, Options if (uri = value.delete(:uri)) value[:uri] = Utils.URI(uri) end end super(value) end