Module: Besepa::Utils::Connection
Instance Method Summary collapse
-
#connection(options = {}) ⇒ Faraday::Connection
Returns a Faraday::Connection object.
Instance Method Details
#connection(options = {}) ⇒ Faraday::Connection
Returns a Faraday::Connection object
14 15 16 17 18 19 20 21 22 |
# File 'lib/besepa/utils/connection.rb', line 14 def connection(={}) = .merge(Besepa.) Faraday.new ( [:endpoint] ) do |conn| conn.request :json conn.response :json, :content_type => /\bjson$/ conn.( 'Bearer', [:api_key]) conn.adapter :net_http end end |