lib/codat/client.rb in codat-0.1.6 vs lib/codat/client.rb in codat-0.1.6.1
- old
+ new
@@ -1,9 +1,9 @@
# frozen_string_literal: true
require 'faraday'
-require 'faraday_middleware/multi_json'
+require 'multi_json'
require 'codat/faraday_codat_auth'
module Codat
class Client
BASE_URLS = {
@@ -24,10 +24,10 @@
end
def connection
@connection ||= Faraday.new(url: api_url) do |conn|
conn.request :codat_auth, Codat.configuration.api_key
- conn.response :multi_json, symbolize_keys: true
+ conn.response :json, parser_options: { symbolize_names: true }
# conn.response :logger # if Codat.configuration.debug?
conn.adapter Faraday.default_adapter
end
end