only method
Get Only specific request from body and query
req.only(['email', 'name']);
A key that is not in the input is in the map with null. With
CoreFlags.onlyPresent it is left out.
Implementation
@override
Map<String, dynamic> only(List<String> keys) {
bool present = Dox().flags.onlyPresent;
Map<String, dynamic> ret = <String, dynamic>{};
for (String key in keys) {
if (present && !_allRequest.containsKey(key)) continue;
ret[key] = _allRequest[key];
}
return ret;
}