stringifyQuery = (queryObject, { encode = true } = {}) => {
  const buildNestedParams = (params, key, value) => {
    if (Array.isArray(value)) {
      value.reduce((acc, v) => buildNestedParams(params, key, v), params);
    } else if (value instanceof Date) {
      params.append(key, value.toISOString());
    } else if (typeof value === 'object') {
      Object.entries(value).reduce(
        (acc, [k, v]) => buildNestedParams(params, `${key}[${k}]`, v),
        params
      );
    } else {
      params.append(key, value);
    }

    return params;
  };
  const params = Object.entries(queryObject).reduce(
    (acc, [key, value]) => buildNestedParams(acc, key, value),
    new URLSearchParams()
  );
  const queryString = String(params);

  return encode ? queryString : decodeURIComponent(queryString);
}
Build a new FormData instance, support array as field value
OAS2.0 - when collectionFormat is multi
OAS3.0 - when explode of Encoding Object is true

This function explicitly handles Buffers (for backward compatibility)
if provided as a values to FormData. FormData can only handle USVString
or Blob.

@param {Object} reqForm - ori req.form
@return {FormData} - new FormData instance