Modifier and Type | Method and Description |
---|---|
MutableHeaders |
add(CharSequence name,
Object value)
Adds a new header with the specified name and value.
|
MutableHeaders |
clear()
Removes all headers from this message.
|
MutableHeaders |
copy(Headers headers) |
MutableHeaders |
copy(Multimap<String,String> headers) |
MutableHeaders |
copy(MultiValueMap<String,String> headers) |
MutableHeaders |
remove(String name)
Removes the header with the specified name.
|
MutableHeaders |
set(CharSequence name,
Iterable<?> values)
Sets a new header with the specified name and values.
|
MutableHeaders |
set(CharSequence name,
Object value)
Sets the (only) value for the header with the specified name.
|
MutableHeaders |
setDate(CharSequence name,
Date value)
Set a header with the given date as the value.
|
MutableHeaders add(CharSequence name, Object value)
Will not replace any existing values for the header.
name
- The name of the headervalue
- The value of the headerMutableHeaders set(CharSequence name, Object value)
All existing values for the same header will be removed.
name
- The name of the headervalue
- The value of the headerMutableHeaders setDate(CharSequence name, Date value)
name
- The name of the headervalue
- The date valueMutableHeaders set(CharSequence name, Iterable<?> values)
All existing values for the same header will be removed.
name
- The name of the headervalues
- The values of the headerMutableHeaders remove(String name)
name
- The name of the header to remove.MutableHeaders clear()
MutableHeaders copy(Headers headers)
MutableHeaders copy(MultiValueMap<String,String> headers)
MutableHeaders copy(Multimap<String,String> headers)