withHeaderList method
Copy with every value of name replaced by values (a multi-valued
header such as Set-Cookie); an empty list removes the header.
Implementation
Response withHeaderList(String name, List<String> values) {
final copy = headers.copy()..remove(name);
for (final value in values) {
copy.add(name, value);
}
return _copyWith(headers: copy);
}