lib/zoho_hub/connection.rb in zoho_hub-0.1.49 vs lib/zoho_hub/connection.rb in zoho_hub-0.1.50
- old
+ new
@@ -1,9 +1,8 @@
# frozen_string_literal: true
require 'faraday'
-require 'faraday_middleware'
require 'rainbow'
require 'addressable'
require 'zoho_hub/response'
@@ -101,10 +100,9 @@
end
def adapter
Faraday.new(url: base_url) do |conn|
conn.headers = authorization_header if access_token?
- conn.use FaradayMiddleware::ParseJson
yield conn if block_given?
conn.response :json, parser_options: { symbolize_names: true }
conn.response :logger if ZohoHub.configuration.debug?
conn.adapter Faraday.default_adapter
end