4
5
6
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/bigbank/client/endpoint.rb', line 4
def connection
@connection ||=
::Faraday.new(url: config.endpoint) do |builder|
builder.use ::Faraday::Request::UrlEncoded
builder.response :json, :content_type => /\bjson$/
builder.["User-Agent"] = user_agent
builder.options[:open_timeout] = config.open_timeout
builder.options[:timeout] = config.timeout
builder.adapter config.adapter
builder.ssl.verify = config.verify_ssl
builder.proxy(config.proxy) if config.enable_proxy?
end
end
|