code: def upload_marcxml(self, marcxml, mode):
          
          if mode not in ["-i", "-r", "-c", "-a", "-ir"]:
              raise NameError("Incorrect mode " + str(mode))
  
          return requests.post(self.server_url + "/batchuploader/robotupload",
                               data={'file': marcxml, 'mode': mode},
                               headers={'User-Agent': CFG_USER_AGENT})
docs: Upload a record to the server.
  
          :param marcxml: the XML to upload.
          :param mode: the mode to use for the upload.
              - "-i" insert new records
              - "-r" replace existing records
              - "-c" correct fields of records
              - "-a" append fields to records
              - "-ir" insert record or replace if it exists