Module: IOPromise::Faraday

Defined in:
lib/iopromise/faraday.rb,
lib/iopromise/faraday/promise.rb,
lib/iopromise/faraday/version.rb,
lib/iopromise/faraday/connection.rb,
lib/iopromise/faraday/executor_pool.rb,
lib/iopromise/faraday/continuable_hydra.rb,
lib/iopromise/faraday/multi_socket_action.rb

Defined Under Namespace

Classes: Connection, ContinuableHydra, FaradayExecutorPool, FaradayPromise, MultiSocketAction

Constant Summary collapse

VERSION =
'0.1.1'

Class Method Summary collapse

Class Method Details

.new(url = nil, options = {}, &block) ⇒ Object



9
10
11
12
13
14
15
# File 'lib/iopromise/faraday.rb', line 9

def new(url = nil, options = {}, &block)
  options = ::Faraday.default_connection_options.merge(options)
  ::IOPromise::Faraday::Connection.new(url, options) do |faraday|
    faraday.adapter :typhoeus
    block.call(faraday) unless block.nil?
  end
end