- All Known Subinterfaces:
BodyPartHeaders
,RequestHeaders
,ResponseHeaders
,WebClientRequestHeaders
,WebClientResponseHeaders
- All Known Implementing Classes:
HashHeaders
,ReadableBodyPartHeaders
,ReadOnlyHeaders
,WriteableBodyPartHeaders
Extends
Parameters
interface by adding methods convenient for HTTP headers.-
Method Summary
Modifier and TypeMethodDescriptionReturns an unmodifiableList
of all header fields - each element represents a value of a single header field in the request.Returns an unmodifiableList
of all comma separated header value parts - Such segmentation is NOT valid for all header semantics, however it is very common.Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface io.helidon.common.http.Parameters
add, add, addAll, computeIfAbsent, computeSingleIfAbsent, first, iterator, put, put, putAll, putIfAbsent, putIfAbsent, remove, toMap
-
Method Details
-
all
Returns an unmodifiableList
of all header fields - each element represents a value of a single header field in the request. Consider to usevalue(String)
orvalues(String)
method instead.Always returns a List, which may be empty if the parameter is not present.
- Specified by:
all
in interfaceParameters
- Parameters:
headerName
- the header name- Returns:
- a
List
of values with zero or greater size - Throws:
NullPointerException
- ifheaderName
isnull
- See Also:
-
value
Returns a header value as a singleString
potentially concatenated using comma character fromall
header fields.Accordingly to RFC2616, Message Headers:
Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma.
- Parameters:
headerName
- the header name- Returns:
- all header values concatenated using comma separator
- Throws:
NullPointerException
- ifheaderName
isnull
- See Also:
-
values
Returns an unmodifiableList
of all comma separated header value parts - Such segmentation is NOT valid for all header semantics, however it is very common. Refer to actual header semantics standard/description before use.Result is composed from all header fields with requested
headerName
where each header value is tokenized by a comma character. Tokenization respects value quoting by double-quote character.Always returns a List, which may be empty if the parameter is not present.
- Parameters:
headerName
- the header name- Returns:
- a
List
of values with zero or greater size, nevernull
- Throws:
NullPointerException
- ifheaderName
isnull
- See Also:
-