module Excon
def new(url, params = {})
-
(Connection)
- A new Excon::Connection instance
Parameters:
-
params
(Hash
) -- One or more option params to set on the Connection instance -
url
(String
) -- The destination URL
Other tags:
- See: Connection#initialize -
def new(url, params = {}) uri_parser = params[:uri_parser] || Excon.defaults[:uri_parser] uri = uri_parser.parse(url) params.merge!({ :host => uri.host, :path => uri.path, :port => uri.port.to_s, :query => uri.query, :scheme => uri.scheme, :user => (URI.decode(uri.user) if uri.user), :password => (URI.decode(uri.password) if uri.password), }) Excon::Connection.new(params) end