Add addAll(MultiValueMap)
This commit introduces a new method for MultiValueMap: addAll, which adds all values of a given map (cf putAll, which replaces existing values).
This commit is contained in:
@@ -1357,6 +1357,13 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
currentValues.addAll(values);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addAll(MultiValueMap<String, String> values) {
|
||||
for (Entry<String, List<String>> entry : values.entrySet()) {
|
||||
addAll(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the given, single header value under the given name.
|
||||
* @param headerName the header name
|
||||
|
||||
Reference in New Issue
Block a user