# File lib/smart_proxy_abrt/abrt_lib.rb, line 52
  def self.faf_request(path, content, content_type="application/json")
    uri              = URI.parse(AbrtProxy::Plugin.settings.server_url.to_s)
    http             = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl     = uri.scheme == 'https'
    http.verify_mode = AbrtProxy::Plugin.settings.server_ssl_noverify ? OpenSSL::SSL::VERIFY_NONE
                                                                      : OpenSSL::SSL::VERIFY_PEER

    if AbrtProxy::Plugin.settings.server_ssl_cert && !AbrtProxy::Plugin.settings.server_ssl_cert.to_s.empty? \
        && AbrtProxy::Plugin.settings.server_ssl_key && !AbrtProxy::Plugin.settings.server_ssl_key.to_s.empty?
      http.cert = OpenSSL::X509::Certificate.new(File.read(AbrtProxy::Plugin.settings.server_ssl_cert))
      http.key  = OpenSSL::PKey::RSA.new(File.read(AbrtProxy::Plugin.settings.server_ssl_key), nil)
    end

    headers, body = self.form_data_file content, content_type

    path = [uri.path, path].join unless uri.path.empty?
    response = http.start { |con| con.post(path, body, headers) }

    response
  end