Class: Faraday::ProxyOptions

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/faraday/options/proxy_options.rb

Overview

ProxyOptions contains the configurable properties for the proxy configuration used when making an HTTP request.

Class Method Summary collapse

Class Method Details

.from(value) ⇒ Object



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/faraday/options/proxy_options.rb', line 11

def self.from(value)
  case value
  when String
    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