addAll method
Copies all values from other
Implementation
void addAll(Headers other) {
if (this is _Headers) {
final table = (this as _Headers).table;
if (other is _Headers) {
for (final entry in other.table.entries) {
final values = table[entry.key];
if (values != null) {
values.addAll(entry.value);
} else {
table[entry.key] = List.of(entry.value);
}
}
return;
}
for (final header in other.entries) {
final values = table[header.name];
if (values != null) {
values.add(header.value);
} else {
table[header.name] = [header.value];
}
}
return;
}
for (final header in other.entries) {
add(header.name, header.value);
}
}