autoParseBody function

RequestHandler autoParseBody (
  1. List<String> fields
)

Auto-parses numbers in req.bodyAsMap.

Implementation

RequestHandler autoParseBody(List<String> fields) {
  return (RequestContext req, res) async {
    await req.parseBody();
    req.bodyAsMap.addAll(autoParse(req.bodyAsMap, fields));
    return true;
  };
}