| 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 |
remove(CharSequence 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.
|
default MutableHeaders |
setDate(CharSequence name,
Instant value)
Set a header with the given date as the value.
|
asMultiValueMap, contains, contains, get, get, getAll, getAll, getDate, getDate, getInstant, getNames, getNettyHeadersMutableHeaders add(CharSequence name, Object value)
Will not replace any existing values for the header.
Objects of type Instant, Calendar or Date will be converted to a
RFC 7231 date/time string.
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.
Objects of type Instant, Calendar or Date will be converted to a
RFC 7231 date/time string.
name - The name of the headervalue - The value of the headerMutableHeaders setDate(CharSequence name, Date value)
name - The name of the headervalue - The date valuedefault MutableHeaders setDate(CharSequence name, Instant 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.
Objects of type Instant, Calendar or Date will be converted to a
RFC 7231 date/time string.
name - The name of the headervalues - The values of the headerMutableHeaders remove(CharSequence name)
name - The name of the header to remove.MutableHeaders clear()
MutableHeaders copy(Headers headers)