lib/uploadcare/rest/connections/upload_connection.rb in uploadcare-ruby-1.2.2 vs lib/uploadcare/rest/connections/upload_connection.rb in uploadcare-ruby-2.0.0

- old
+ new

@@ -7,14 +7,15 @@ ca_path = '/etc/ssl/certs' if File.exists?('/etc/ssl/certs') super ssl: { ca_path: ca_path }, url: options[:upload_url_base] do |frd| frd.request :multipart frd.request :url_encoded - frd.adapter :net_http - frd.headers['User-Agent'] = UserAgent.new.call(options) + frd.headers['User-Agent'] = Uploadcare::user_agent(options) frd.response :uploadcare_raise_error frd.response :uploadcare_parse_json + + frd.adapter :net_http end end end end end