module Faraday

def new(url = nil, options = nil)

Returns a Faraday::Connection.

:params => {:page => 1}
Faraday.new :url => 'http://faraday.com',

# same

Faraday.new 'http://faraday.com', :params => {:page => 1}
# http://faraday.com?page=1

Faraday.new 'http://faraday.com'

Examples

:proxy - Hash of Proxy options.
:ssl - Hash of SSL options.
:request - Hash of request options.
:headers - Hash of unencoded HTTP header key/value pairs.
:params - Hash of URI query unencoded key/value pairs.
:url - String base URL.
overridden for a specific request.
Any of these values will be set on every request made, unless
options - The optional Hash used to configure this Faraday::Connection.
requests. Can also be the options Hash.
url - The optional String base URL to use as a prefix for all

Public: Initializes a new Faraday::Connection.
def new(url = nil, options = nil)
  block = block_given? ? Proc.new : nil
  options = options ? default_connection_options.merge(options) : default_connection_options
  Faraday::Connection.new(url, options, &block)
end