code: function getQueries(req, end) {
    var urlencoded = /^application\/x-www-form-urlencoded/;
    var multipart = /^multipart\/form-data/;
    var contentType = req.headers['content-type'] || '';
  
    if (multipart.test(contentType)) {
      // Multipart data.
      req.form = req.form || new formidable.IncomingForm();
      req.form.multiples = true;
      req.form.parse(req, function(err, fields, files) {
        req.fields = fields;
        req.files = files;
        // Ensure that files are arrays.
        for (var key in req.files) {
          if (!(req.files[key] instanceof Array)) {
            req.files[key] = [req.files[key]];
          }
        }
        if (err == null) {
          addToQuery(req, req.fields);
          addToQuery(req, req.files);
        }
        end(err);
      });
  
    } else if (urlencoded.test(contentType)) {
      // URL encoded data.
      var chunks;
      var gotrequest = function (chunk) {
        if (chunk !== undefined) {
          if (chunks === undefined) {
            chunks = chunk;
          } else {
            chunks = Buffer.concat([chunks, chunk]);
          }
        }
      };
      req.on('data', gotrequest);
      req.on('end', function(err) {
        if (req.server.saveRequestChunks) {
          req.savedChunks = chunks;
        }
        var strquery = chunks? chunks.toString(): '';
        jsonFromQuery(strquery, req.query);
        end(err);
      });
    } else {
      // URL query parameters.
      var search = req.uri.search || '';
      jsonFromQuery(search.slice(1), req.query);
      end();
    }
  }
docs: We'll need to parse the query as a literal. Ask objects already have ask.query set after the URL query part. This function updates ask.query with: - application/x-www-form-urlencoded - multipart/form-data