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