- 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 unmodifiableListof all header fields - each element represents a value of a single header field in the request.Returns an unmodifiableListof 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, spliteratorMethods 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 unmodifiableListof 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:
allin interfaceParameters- Parameters:
headerName- the header name- Returns:
- a
Listof values with zero or greater size - Throws:
NullPointerException- ifheaderNameisnull- See Also:
-
value
Returns a header value as a singleStringpotentially concatenated using comma character fromallheader 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- ifheaderNameisnull- See Also:
-
values
Returns an unmodifiableListof 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
headerNamewhere 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
Listof values with zero or greater size, nevernull - Throws:
NullPointerException- ifheaderNameisnull- See Also:
-