Added removeHeader() method to MessageBuilder.
This commit is contained in:
@@ -96,6 +96,16 @@ public final class MessageBuilder<T> {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the value for the given header name.
|
||||
*/
|
||||
public MessageBuilder<T> removeHeader(String headerName) {
|
||||
if (StringUtils.hasLength(headerName)) {
|
||||
this.headers.remove(headerName);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy the name-value pairs from the provided Map. This operation will
|
||||
* overwrite any existing values. Use {{@link #copyHeadersIfAbsent(Map)}
|
||||
|
||||
Reference in New Issue
Block a user