filterBody function
Filters unwanted data out of req.bodyAsMap
.
Implementation
RequestHandler filterBody(Iterable<String> only) {
return (RequestContext req, res) async {
await req.parseBody();
var filtered = filter(req.bodyAsMap, only);
req.bodyAsMap
..clear()
..addAll(filtered);
return true;
};
}