lib/klaviyo/client.rb in parallel588-klaviyo-0.14.5 vs lib/klaviyo/client.rb in parallel588-klaviyo-0.14.8

- old
+ new

@@ -12,12 +12,11 @@ @token = token raise Errors::AuthenticationError, 'No API key provided.' unless @api_key raise Errors::AuthenticationError, 'No Token provided.' unless @token @conn = Faraday.new(default_req_options.merge(req_options)) do |f| - f.headers['Accept'] = 'application/json' - f.headers[:content_type] = 'application/json' - f.request :url_encoded + f.request :url_encoded + f.use Errors::RequestError f.adapter Faraday.default_adapter end end