docs: function(params, callback) {
                  var url = params.url,
                      fileSize,
                      originalFileName,
                      threadId,
                      fileUniqueId,
                      fileObject,
                      data = params.data,
                      method = (typeof params.method == 'string')
                          ? params.method
                          : 'GET',
                      fileUploadUniqueId = (typeof params.uniqueId == 'string')
                          ? params.uniqueId
                          : 'uniqueId',
                      hasError = false;
  
                  if (!url) {
                      callback({
                          hasError: true,
                          errorCode: 6201,
                          errorMessage: CHAT_ERRORS[6201]
                      });
                      return;
                  }
  
                  var hasFile = false;
  
                  httpRequestObject[eval('fileUploadUniqueId')] = new XMLHttpRequest(),
                      settings = params.settings;
  
                  httpRequestObject[eval('fileUploadUniqueId')].timeout = (settings && typeof parseInt(settings.timeout) > 0 && settings.timeout > 0)
                      ? settings.timeout
                      : httpRequestTimeout;
  
                  httpRequestObject[eval('fileUploadUniqueId')]
                      .addEventListener('error', function(event) {
                          if (callback) {
                              if (hasFile) {
                                  hasError = true;
                                  fireEvent('fileUploadEvents', {
                                      threadId: threadId,
                                      uniqueId: fileUniqueId,
                                      state: 'UPLOAD_ERROR',
                                      progress: 0,
                                      fileInfo: {
                                          fileName: originalFileName,
                                          fileSize: fileSize
                                      },
                                      fileObject: fileObject,
                                      errorCode: 6200,
                                      errorMessage: CHAT_ERRORS[6200] + ' (XMLHttpRequest Error Event Listener)'
                                  });
                              }
                              callback({
                                  hasError: true,
                                  errorCode: 6200,
                                  errorMessage: CHAT_ERRORS[6200] + ' (XMLHttpRequest Error Event Listener)'
                              });
                          }
                      }, false);
  
                  httpRequestObject[eval('fileUploadUniqueId')].addEventListener('abort',
                      function(event) {
                          if (callback) {
                              if (hasFile) {
                                  hasError = true;
                                  fireEvent('fileUploadEvents', {
                                      threadId: threadId,
                                      uniqueId: fileUniqueId,
                                      state: 'UPLOAD_CANCELED',
                                      progress: 0,
                                      fileInfo: {
                                          fileName: originalFileName,
                                          fileSize: fileSize
                                      },
                                      fileObject: fileObject,
                                      errorCode: 6303,
                                      errorMessage: CHAT_ERRORS[6303]
                                  });
                              }
                              callback({
                                  hasError: true,
                                  errorCode: 6303,
                                  errorMessage: CHAT_ERRORS[6303]
                              });
                          }
                      }, false);
  
                  try {
                      if (method == 'GET') {
                          if (typeof data === 'object' && data !== null) {
                              var keys = Object.keys(data);
  
                              if (keys.length > 0) {
                                  url += '?';
  
                                  for (var i = 0; i < keys.length; i++) {
                                      var key = keys[i];
                                      url += key + '=' + data[key];
                                      if (i < keys.length - 1) {
                                          url += '&';
                                      }
                                  }
                              }
                          }
                          else if (typeof data === 'string' && data !== null) {
                              url += '?' + data;
                          }
  
                          httpRequestObject[eval('fileUploadUniqueId')].open(method, url, true);
  
                          if (typeof params.headers === 'object') {
                              for (var key in params.headers) {
                                  httpRequestObject[eval('fileUploadUniqueId')].setRequestHeader(key, params.headers[key]);
                              }
                          }
  
                          httpRequestObject[eval('fileUploadUniqueId')].send();
                      }
  
                      if (method === 'POST' && data) {
  
                          httpRequestObject[eval('fileUploadUniqueId')].open(method, url, true);
  
                          if (typeof params.headers === 'object') {
                              for (var key in params.headers) {
                                  httpRequestObject[eval('fileUploadUniqueId')].setRequestHeader(key, params.headers[key]);
                              }
                          }
  
                          if (typeof data == 'object') {
                              if (data.hasOwnProperty('image') || data.hasOwnProperty('file')) {
                                  hasFile = true;
                                  var formData = new FormData();
                                  for (var key in data) {
                                      formData.append(key, data[key]);
                                  }
  
                                  fileSize = data.fileSize;
                                  originalFileName = data.originalFileName;
                                  threadId = data.threadId;
                                  fileUniqueId = data.uniqueId;
                                  fileObject = (data['image'])
                                      ? data['image']
                                      : data['file'];
  
                                  httpRequestObject[eval('fileUploadUniqueId')].upload.onprogress = function(event) {
                                      if (event.lengthComputable && !hasError) {
                                          fireEvent('fileUploadEvents', {
                                              threadId: threadId,
                                              uniqueId: fileUniqueId,
                                              state: 'UPLOADING',
                                              progress: Math.round((event.loaded / event.total) * 100),
                                              fileInfo: {
                                                  fileName: originalFileName,
                                                  fileSize: fileSize
                                              },
                                              fileObject: fileObject
                                          });
                                      }
                                  };
  
                                  httpRequestObject[eval('fileUploadUniqueId')].send(formData);
                              }
                              else {
                                  httpRequestObject[eval('fileUploadUniqueId')].setRequestHeader(
                                      'Content-Type',
                                      'application/x-www-form-urlencoded');
  
                                  var keys = Object.keys(data);
  
                                  if (keys.length > 0) {
                                      sendData = '';
  
                                      for (var i = 0; i < keys.length; i++) {
                                          var key = keys[i];
                                          sendData += key + '=' + data[key];
                                          if (i < keys.length - 1) {
                                              sendData += '&';
                                          }
                                      }
                                  }
  
                                  httpRequestObject[eval('fileUploadUniqueId')].send(sendData);
                              }
                          }
                          else {
                              httpRequestObject[eval('fileUploadUniqueId')].send(data);
                          }
                      }
                  }
                  catch (e) {
                      callback && callback({
                          hasError: true,
                          cache: false,
                          errorCode: 6200,
                          errorMessage: CHAT_ERRORS[6200] + ' (Request Catch Error)' + e
                      });
                  }
  
                  httpRequestObject[eval('fileUploadUniqueId')].onreadystatechange = function() {
                      if (httpRequestObject[eval('fileUploadUniqueId')].readyState == 4) {
                          if (httpRequestObject[eval('fileUploadUniqueId')].status == 200) {
                              if (hasFile) {
                                  hasError = false;
                                  fireEvent('fileUploadEvents', {
                                      threadId: threadId,
                                      uniqueId: fileUniqueId,
                                      state: 'UPLOADED',
                                      progress: 100,
                                      fileInfo: {
                                          fileName: originalFileName,
                                          fileSize: fileSize
                                      },
                                      fileObject: fileObject
                                  });
                              }
  
                              callback && callback({
                                  hasError: false,
                                  cache: false,
                                  result: {
                                      responseText: httpRequestObject[eval('fileUploadUniqueId')].responseText,
                                      responseHeaders: httpRequestObject[eval('fileUploadUniqueId')].getAllResponseHeaders()
                                  }
                              });
                          }
                          else {
                              if (hasFile) {
                                  hasError = true;
                                  fireEvent('fileUploadEvents', {
                                      threadId: threadId,
                                      uniqueId: fileUniqueId,
                                      state: 'UPLOAD_ERROR',
                                      progress: 0,
                                      fileInfo: {
                                          fileName: originalFileName,
                                          fileSize: fileSize
                                      },
                                      fileObject: fileObject,
                                      errorCode: 6200,
                                      errorMessage: CHAT_ERRORS[6200] + ' (Request Status != 200)',
                                      statusCode: httpRequestObject[eval('fileUploadUniqueId')].status
                                  });
                              }
                              callback && callback({
                                  hasError: true,
                                  errorMessage: httpRequestObject[eval('fileUploadUniqueId')].responseText,
                                  errorCode: httpRequestObject[eval('fileUploadUniqueId')].status
                              });
                          }
                      }
                  };
              }