Sha256: a43001e9ccde61a74cec399463217eecd82eae98377b9a3bd457b721f71b265b
Contents?: true
Size: 439 Bytes
Versions: 3
Compression:
Stored size: 439 Bytes
Contents
require 'faraday_middleware/parse_oj' module Taric module Connection def connection(config) options = { :headers => {'Accept' => "application/#{config.format}; charset=utf-8", 'User-Agent' => config.user_agent} }.merge(config.connection_opts) Faraday::Connection.new(options) do |conn| conn.response :oj, :content_type => /\bjson$/ conn.adapter config.adapter end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
taric-0.1.9 | lib/taric/connection.rb |
taric-0.1.8 | lib/taric/connection.rb |
taric-0.1.7 | lib/taric/connection.rb |