lib/moysklad/client.rb in moysklad-0.4.7 vs lib/moysklad/client.rb in moysklad-0.4.8
- old
+ new
@@ -9,9 +9,11 @@
class Moysklad::Client
URL ='https://api.moysklad.ru/api/remap/1.2/'
def initialize login: nil, password: nil, logger: nil
@client = Faraday.new URL do |conn|
+ # Needs for downloads
+ conn.use FaradayMiddleware::FollowRedirects
unless logger.nil?
conn.response :detailed_logger, logger
conn.request :curl, logger, :info
end
conn.request :gzip