- All Known Subinterfaces:
HeaderWriteable
- All Known Implementing Classes:
ContentDisposition
HTTP Header with
HeaderName and value.- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionAll values of this header.allValues(boolean split) All values of this header.booleanchanging()Changing headers should not be cached, and their value should not be indexed (HTTP/2).Header name for the header.name()Name of the header as configured by user or as received on the wire.booleanSensitive headers should not be logged, or indexed (HTTP/2).default voidvalidate()Check validity of header name and values.default Stringvalue()Deprecated, for removal: This API element is subject to removal in a future version.default byte[]Cached bytes of a single valued header's value.intNumber of values this header has.default Stringvalues()All values concatenated using a comma.default voidwriteHttp1Header(BufferData buffer) Write the current header as an HTTP header to the provided buffer.
-
Method Details
-
name
String name()Name of the header as configured by user or as received on the wire. -
value
Deprecated, for removal: This API element is subject to removal in a future version.useValue.get()Value of the header.- Returns:
- header value
-
headerName
HeaderName headerName()Header name for the header.- Returns:
- header name
-
values
All values concatenated using a comma.- Returns:
- all values joined by a comma
-
allValues
All values of this header.- Returns:
- all configured values
-
allValues
All values of this header. If this header is defined as a single header with comma separated values, setsplitto true.- Parameters:
split- whether to split single value by comma, does nothing if the value is already a list.- Returns:
- list of values
-
valueCount
int valueCount()Number of values this header has.- Returns:
- number of values (minimal number is 1)
-
sensitive
boolean sensitive()Sensitive headers should not be logged, or indexed (HTTP/2).- Returns:
- whether this header is sensitive
-
changing
boolean changing()Changing headers should not be cached, and their value should not be indexed (HTTP/2).- Returns:
- whether this header's value is changing often
-
valueBytes
default byte[] valueBytes()Cached bytes of a single valued header's value.- Returns:
- value bytes
-
writeHttp1Header
Write the current header as an HTTP header to the provided buffer.- Parameters:
buffer- buffer to write to (should be growing)
-
validate
Check validity of header name and values.- Throws:
IllegalArgumentException- in case the HeaderValue is not valid
-
Value.get()