Package io.helidon.reactive.webclient
Interface WebClientRequestHeaders
- All Superinterfaces:
ClientRequestHeaders,Headers,Iterable<Http.HeaderValue>,ServerRequestHeaders,WritableHeaders<ClientRequestHeaders>
Headers that can be modified (until request is sent) for
outbound request.
-
Field Summary
Fields inherited from interface io.helidon.common.http.ServerRequestHeaders
HUC_ACCEPT_DEFAULT, HUC_ACCEPT_DEFAULT_TYPES -
Method Summary
Modifier and TypeMethodDescriptiondefault WebClientRequestHeadersadd(Http.HeaderName key, String... values) Add header values.Deprecated.addAccept(HttpMediaType mediaType) Add acceptedHttpMediaType.Add each header, combining values if header already exists.Add a cookie to the request.contentLength(long length) Set a content length.contentType(HttpMediaType contentType) Set a content type.ifMatch()Returns value of headerHttp.Header.IF_MATCH.SetsHttp.Header.IF_MATCHheader to specific etags.ifModifiedSince(ZonedDateTime time) SetsHttp.Header.IF_MODIFIED_SINCEheader to specific time.Returns value of headerHttp.Header.IF_NONE_MATCH.ifNoneMatch(String... etags) SetsHttp.Header.IF_NONE_MATCHheader to specific etags.SetsHttp.Header.IF_RANGEheader to specific etag.ifRange(ZonedDateTime time) SetsHttp.Header.IF_RANGEheader to specific time.Returns value of headerHttp.Header.IF_RANGEas aZonedDateTime.Returns value of headerHttp.Header.IF_RANGEas aString.SetsHttp.Header.IF_UNMODIFIED_SINCEheader to specific time.Add each header, replacing values if header already exists.unsetHeader(Http.HeaderName name) Remove a header if set.default WebClientRequestHeadersunsetHeader(String name) Deprecated.Methods inherited from interface io.helidon.common.http.ClientRequestHeaders
acceptMethods inherited from interface io.helidon.common.http.Headers
acceptedTypes, all, all, contains, contains, contentLength, contentType, first, get, size, toMap, value, valuesMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface io.helidon.common.http.ServerRequestHeaders
acceptDatetime, bestAccepted, cookies, date, ifModifiedSince, ifUnmodifiedSince, isAccepted, refererMethods inherited from interface io.helidon.common.http.WritableHeaders
add, clear, contentType, remove, remove, set, set, set, setIfAbsent
-
Method Details
-
unsetHeader
Deprecated.Remove a header if set.- Parameters:
name- header name- Returns:
- updated headers instance
-
unsetHeader
Remove a header if set.- Parameters:
name- header name- Returns:
- updated headers instance
-
addCookie
Add a cookie to the request.- Parameters:
name- cookie namevalue- cookie value- Returns:
- updated headers instance
-
contentType
Set a content type. This method is optional if you use a writer for a specific type. If the content type is explicitly defined, writer will NOT override it.- Specified by:
contentTypein interfaceWritableHeaders<ClientRequestHeaders>- Parameters:
contentType- content type of the request- Returns:
- updated headers instance
-
contentLength
Set a content length. This method is optional. Use only when you know the exact length of entity in bytes.- Specified by:
contentLengthin interfaceWritableHeaders<ClientRequestHeaders>- Parameters:
length- content length of entity- Returns:
- updated headers instance
-
addAccept
Add acceptedHttpMediaType. Supports quality factor and wildcards. Ordered by invocation order.- Parameters:
mediaType- media type to accept, with optional quality factor- Returns:
- updated headers instance
-
ifModifiedSince
SetsHttp.Header.IF_MODIFIED_SINCEheader to specific time.- Parameters:
time- zoned date time- Returns:
- updated headers instance
-
ifUnmodifiedSince
SetsHttp.Header.IF_UNMODIFIED_SINCEheader to specific time.- Parameters:
time- zoned date time- Returns:
- updated headers instance
-
ifNoneMatch
SetsHttp.Header.IF_NONE_MATCHheader to specific etags.- Parameters:
etags- etags- Returns:
- updated headers instance
-
ifMatch
SetsHttp.Header.IF_MATCHheader to specific etags.- Parameters:
etags- etags- Returns:
- updated headers instance
-
ifRange
SetsHttp.Header.IF_RANGEheader to specific time.- Parameters:
time- zoned date time- Returns:
- updated headers instance
-
ifRange
SetsHttp.Header.IF_RANGEheader to specific etag.- Parameters:
etag- etag- Returns:
- updated headers instance
-
ifNoneMatch
Returns value of headerHttp.Header.IF_NONE_MATCH. EmptyListis returned if this header is not set.- Returns:
- A list of etags.
-
ifMatch
Returns value of headerHttp.Header.IF_MATCH. EmptyListis returned if this header is not set.- Returns:
- A list of etags.
-
ifRangeDate
Optional<ZonedDateTime> ifRangeDate()Returns value of headerHttp.Header.IF_RANGEas aZonedDateTime.- Returns:
- formatted header IF_RANGE as ZonedDateTime
-
ifRangeString
Returns value of headerHttp.Header.IF_RANGEas aString.- Returns:
- formatted header IF_RANGE as String
-
putAll
Add each header, replacing values if header already exists.- Parameters:
parameters- headers- Returns:
- updated headers
-
add
Deprecated.Add header values.- Parameters:
key- header namevalues- header values- Returns:
- updated headers
-
add
Add header values.- Specified by:
addin interfaceWritableHeaders<ClientRequestHeaders>- Parameters:
key- header namevalues- header values- Returns:
- updated headers
-
addAll
Add each header, combining values if header already exists.- Parameters:
parameters- headers- Returns:
- updated headers
-
add(io.helidon.common.http.Http.HeaderName, String...)