C
- the generic typeB
- the generic typeBasicAuthCredentialsAccessor
, BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B>
, BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator
, BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty
, BearerAuthCredentialsAccessor
, BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<B>
, BearerAuthCredentialsAccessor.BearerAuthCredentialsMutator
, BearerAuthCredentialsAccessor.BearerAuthCredentialsProperty
, HttpFields<B>
, Map<C,B>
RequestHeaderFields
, ResponseHeaderFields
AbstractHeaderFields
, RequestHeaderFieldsImpl
, ResponseHeaderFieldsImpl
public interface HeaderFields<C extends Cookie,B extends HeaderFields<C,B>> extends HttpFields<B>, BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty, BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B>, BearerAuthCredentialsAccessor.BearerAuthCredentialsProperty, BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<B>
HeaderFields
reflect the structure of a HTTP header and may be
used to represent a HTTP header.BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B extends BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B>>, BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator, BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty
BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<B extends BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<B>>, BearerAuthCredentialsAccessor.BearerAuthCredentialsMutator, BearerAuthCredentialsAccessor.BearerAuthCredentialsProperty
Modifier and Type | Field | Description |
---|---|---|
static String |
BASIC_REALM |
Modifier and Type | Method | Description |
---|---|---|
C |
addCookie(C aCookie) |
Adds an individual server-side cookie to be sent to the client to this
ResponseHeaderFields instance. |
C |
addCookie(String aHttpCookie) |
Adds an individual server-side cookie to be sent to the client to this
ResponseHeaderFields instance. |
C |
addCookie(String aCookieName,
String aValue) |
Adds an individual server-side cookie to be sent to the client to this
ResponseHeaderFields instance. |
default void |
addTo(HeaderField aHeaderField,
String aValue) |
Adds the value to the given Header-Field.
|
default void |
addTo(HeaderField aHeaderField,
String... aValues) |
Adds the given values to the according Header-Field.
|
default void |
addTo(HeaderField aHeaderField,
List<String> aValues) |
Adds the given values to the according Header-Field.
|
default List<String> |
get(HeaderField aHeaderField) |
Gets the values for the according Header-Field..
|
default List<String> |
getAcceptCharsets() |
Gets the Accept-Charset request-Header-Field
HeaderField.ACCEPT_CHARSET . |
default List<ContentEncoding> |
getAcceptEncodings() |
Gets the the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default List<ContentType> |
getAcceptTypes() |
Gets the Accept request-Header-Field
HeaderField.ACCEPT :
"... |
List<C> |
getAllCookies() |
Retrieves an array of cookies sent by the client stored in this
RequestHeaderFields instance. |
default List<HttpMethod> |
getAllowMethods() |
Gets the Allow entity-Header-Field
HeaderField.ALLOW :
"... |
default String |
getAuthenticate() |
Gets the WWW-Authenticate response-Header-Field
HeaderField.WWW_AUTHENTICATE :
"... |
default String |
getBasicAuth() |
Retrieves the WWW-Authenticate field for Basic-Authentication.
|
default BasicAuthCredentials |
getBasicAuthCredentials() |
Retrieves the
BasicAuthCredentials from the request (or null if
there are none such credentials). |
default BearerAuthCredentials |
getBearerAuthCredentials() |
Retrieves the
BearerAuthCredentials from the request (or null if
there are none such credentials). |
default ContentEncoding |
getContentEncoding() |
Gets the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default ContentType |
getContentType() |
Gets the Content-Type entity-Header-Field
HeaderField.CONTENT_TYPE :
"... |
default List<C> |
getCookies(String aCookieName) |
Retrieves an individual cookie sent by the client stored in this
RequestHeaderFields instance. |
default String |
getFirst(HeaderField aHeaderField) |
Gets the first value of the according Header-Field.
|
default C |
getFirstCookie(String aCookieName) |
Same as
getAllCookies() though just returning the first cookie. |
default String |
getHost() |
Gets the Host request-Header-Field
HeaderField.HOST :
"... |
default String |
getRequestId() |
Gets the (interprocess) Request-Correlation ID field
HeaderField.REQUEST_ID :
A Request-Correlation ID is an ID to uniquely identify an entity
(request) across multiple systems. |
default String |
getSessionId() |
Gets the (interprocess) Session-Correlation ID field
HeaderField.SESSION_ID :
A Session-Correlation ID is an ID to uniquely identify an entity
(session) across multiple systems. |
default List<String> |
getUnknownAcceptTypes() |
Gets the unresolvable (unknown) Accept request-Header-Field
HeaderField.ACCEPT . |
default List<String> |
getUnknownContentTypes() |
Gets the unresolvable (unknown) Content-Type request-Header-Field
HeaderField.CONTENT_TYPE . |
default String |
getUserAgent() |
Gets the User-Agent request-Header-Field
HeaderField.USER_AGENT :
"... |
default List<String> |
put(HeaderField aHeaderField,
String aValue) |
Puts (replaces) the currently set Header-Field values with the provided
one.
|
default List<String> |
put(HeaderField aHeaderField,
String... aValues) |
Puts (replaces) the currently set Header-Field values with the provided
ones.
|
default List<String> |
put(HeaderField aHeaderField,
List<String> aValues) |
Puts (replaces) the currently set Header-Field values with the provided
ones.
|
default List<String> |
putAcceptCharsets(String... aAcceptCharsets) |
Sets the Accept-Charset request-Header-Field
HeaderField.ACCEPT_CHARSET . |
default List<String> |
putAcceptCharsets(List<String> aAcceptCharsets) |
Sets the Accept-Charset request-Header-Field
HeaderField.ACCEPT_CHARSET . |
default List<ContentEncoding> |
putAcceptEncodings(List<ContentEncoding> aEncodings) |
Sets the the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default List<ContentEncoding> |
putAcceptEncodings(ContentEncoding... aEncodings) |
Sets the the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default List<ContentType> |
putAcceptTypes(List<? extends HttpMediaType> aHttpMediaTypes) |
Sets the Accept request-Header-Field
HeaderField.ACCEPT . |
default List<ContentType> |
putAcceptTypes(HttpMediaType... aHttpMediaType) |
Sets the Accept request-Header-Field
HeaderField.ACCEPT . |
default List<HttpMethod> |
putAllowMethods(List<HttpMethod> aHttpMethods) |
Sets the Allow entity-Header-Field
HeaderField.ALLOW :
"... |
default List<HttpMethod> |
putAllowMethods(HttpMethod... aHttpMethods) |
Sets the Allow entity-Header-Field
HeaderField.ALLOW :
"... |
default String |
putAuthenticate(String aAuthenticate) |
Sets the WWW-Authenticate response-Header-Field
HeaderField.WWW_AUTHENTICATE :
"... |
default BasicAuthCredentials |
putBasicAuthCredentials(BasicAuthCredentials aBasicAuthCredentials) |
Sets the
BasicAuthCredentials (user name and secret) for HTTP
Basic-Authentication. |
default String |
putBasicAuthRequired(String aRealm) |
Sets the WWW-Authenticate field for Basic-Authentication with the given
realm.
|
default BearerAuthCredentials |
putBearerAuthCredentials(BearerAuthCredentials aBearerAuthCredentials) |
Sets the
BearerAuthCredentials (token) for HTTP bearer
authentication. |
default ContentEncoding |
putContentEncoding(ContentEncoding aEncoding) |
Sets the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default ContentType |
putContentType(HttpMediaType aHttpMediaType) |
Sets the Content-Type entity-Header-Field
HeaderField.CONTENT_TYPE . |
default ContentType |
putContentType(MediaType aMediaType,
Map<String,String> aParameters) |
Sets the Content-Type entity-Header-Field
HeaderField.CONTENT_TYPE . :
"... |
default String |
putHost(String aHost) |
Sets the Host request-Header-Field
HeaderField.HOST :
"... |
default String |
putRequestId(String aRequestId) |
Sets the (interprocess) Request-Correlation ID field
HeaderField.REQUEST_ID :
A Request-Correlation ID is an ID to uniquely identify an entity
(request) across multiple systems. |
default String |
putSessionId(String aSessionId) |
Sets the (interprocess) Session-Correlation ID field
HeaderField.SESSION_ID :
A Session-Correlation ID is an ID to uniquely identify an entity
(session) across multiple systems. |
default String |
putUserAgent(String aUserAgent) |
Sets the User-Agent request-Header-Field
HeaderField.USER_AGENT :
"... |
default List<String> |
remove(HeaderField aHeaderField) |
Removes the values from the given Header-Field.
|
default List<String> |
removeAcceptCharsets() |
Removes the Accept-Charset request-Header-Field
HeaderField.ACCEPT_CHARSET . |
default List<ContentEncoding> |
removeAcceptEncodings() |
Removes the the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default List<ContentType> |
removeAcceptTypes() |
Removes the Accept request-Header-Field
HeaderField.ACCEPT :
"... |
default List<HttpMethod> |
removeAllowMethods() |
Removes the Allow entity-Header-Field
HeaderField.ALLOW :
"... |
default String |
removeAuthenticate() |
Removes the WWW-Authenticate response-Header-Field
HeaderField.WWW_AUTHENTICATE :
"... |
default BasicAuthCredentials |
removeBasicAuthCredentials() |
Removes the
BasicAuthCredentials (user name and secret) for HTTP
Basic-Authentication. |
default String |
removeBasicAuthenticate() |
Removes the WWW-Authenticate field for Basic-Authentication.
|
default BearerAuthCredentials |
removeBearerAuthCredentials() |
Removes the
BearerAuthCredentials (token) for HTTP bearer
authentication. |
default ContentEncoding |
removeContentEncoding() |
Removes the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default ContentType |
removeContentType() |
Removes the Content-Type entity-Header-Field
HeaderField.CONTENT_TYPE . :
"... |
default String |
removeHost() |
Removes the Host request-Header-Field
HeaderField.HOST :
"... |
default String |
removeRequestId() |
Removes the (interprocess) Request-Correlation ID field
HeaderField.REQUEST_ID :
A Request-Correlation ID is an ID to uniquely identify an entity
(request) across multiple systems. |
default String |
removeSessionId() |
Removes the (interprocess) Session-Correlation ID field
HeaderField.SESSION_ID :
A Session-Correlation ID is an ID to uniquely identify an entity
(session) across multiple systems. |
default String |
removeUserAgent() |
Removes he User-Agent request-Header-Field
HeaderField.USER_AGENT
:
"... |
default String |
toBasicAuthRealm() |
Extracts the real (if any) from the
HeaderField.WWW_AUTHENTICATE
Header-Field (getAuthenticate() ). |
default void |
toHeaderFields(Map<String,List<String>> aToFields) |
Copies the Header-Fields into the provided
Map . |
default String[] |
toHttpCookies() |
Creates a HTTP Header-Field value from the herein stored
Cookie
instances. |
default B |
withAcceptCharsets(String... aAcceptCharsets) |
Sets the Accept-Charset request-Header-Field
HeaderField.ACCEPT_CHARSET . |
default B |
withAcceptCharsets(List<String> aAcceptCharsets) |
Sets the the Accept-Charset request-Header-Field
HeaderField.ACCEPT_CHARSET . |
default B |
withAcceptEncodings(List<ContentEncoding> aEncodings) |
Sets the the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default B |
withAcceptEncodings(ContentEncoding... aEncodings) |
Sets the the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default B |
withAcceptTypes(List<? extends HttpMediaType> aHttpMediaType) |
Sets the Accept request-Header-Field
HeaderField.ACCEPT . |
default B |
withAcceptTypes(HttpMediaType... aHttpMediaType) |
Sets the Accept request-Header-Field
HeaderField.ACCEPT . |
default HeaderFields<C,B> |
withAddCookie(C aCookie) |
Builder method for the
addCookie(Cookie) method. |
default HeaderFields<C,B> |
withAddCookie(String aCookieName,
String aValue) |
Builder method for the
addCookie(String, String) method. |
default HeaderFields<C,B> |
withAddTo(HeaderField aHeaderField,
String aValue) |
Builder method for
addTo(HeaderField, String) . |
default HeaderFields<C,B> |
withAddTo(HeaderField aHeaderField,
String... aValues) |
Builder method for
addTo(HeaderField, String ...) . |
default HeaderFields<C,B> |
withAddTo(HeaderField aHeaderField,
List<String> aValues) |
Builder method for
addTo(HeaderField, List) . |
default B |
withAllowMethods(List<HttpMethod> aHttpMethods) |
Sets the Allow entity-Header-Field
HeaderField.ALLOW :
"... |
default B |
withAllowMethods(HttpMethod... aHttpMethods) |
Sets the Allow entity-Header-Field
HeaderField.ALLOW :
"... |
default B |
withAuthenticate(String aAuthenticate) |
Sets the WWW-Authenticate response-Header-Field
HeaderField.WWW_AUTHENTICATE :
"... |
default B |
withBasicAuthCredentials(String aUserName,
String aSecret) |
Sets the user name and secret (password) for HTTP Basic-Authentication.
|
default B |
withBasicAuthCredentials(BasicAuthCredentials aBasicAuthCredentials) |
Sets the
BasicAuthCredentials (user name and secret) for HTTP
Basic-Authentication. |
default B |
withBasicAuthRequired(String aRealm) |
Sets the WWW-Authenticate field for Basic-Authentication with the given
realm.
|
default B |
withBearerAuthCredentials(String aToken) |
Sets the token (secret) for HTTP bearer authentication.
|
default B |
withBearerAuthCredentials(BearerAuthCredentials aBearerAuthCredentials) |
Sets the
BearerAuthCredentials (token) for HTTP bearer
authentication. |
default B |
withContentEncoding(ContentEncoding aEncoding) |
Sets the Content-Encoding entity-Header-Field
HeaderField.CONTENT_ENCODING :
"... |
default B |
withContentType(HttpMediaType aHttpMediaType) |
Sets the Content-Type entity-Header-Field
HeaderField.CONTENT_TYPE . |
default B |
withContentType(MediaType aMediaType,
Map<String,String> aParameters) |
Sets the Content-Type's
MediaType and the parameters for the HTTP
body. |
default B |
withHost(String aHost) |
Sets the Host request-Header-Field
HeaderField.HOST :
"... |
default HeaderFields<C,B> |
withPut(HeaderField aHeaderField,
String aValue) |
Builder method for
put(HeaderField, String) . |
default HeaderFields<C,B> |
withPut(HeaderField aHeaderField,
String... aValues) |
Builder method for
put(HeaderField, String ...) . |
default HeaderFields<C,B> |
withPut(HeaderField aHeaderField,
List<String> aValues) |
Builder method for
put(HeaderField, List) . |
default B |
withRequestId(String aRequestId) |
Sets the (interprocess) Request-Correlation ID field
HeaderField.REQUEST_ID :
A Request-Correlation ID is an ID to uniquely identify an entity
(request) across multiple systems. |
default B |
withSessionId(String aSessionId) |
Sets the (interprocess) Session-Correlation ID field
HeaderField.SESSION_ID :
A Session-Correlation ID is an ID to uniquely identify an entity
(session) across multiple systems. |
default B |
withUserAgent(String aUserAgent) |
Sets he User-Agent request-Header-Field
HeaderField.USER_AGENT :
"... |
putBasicAuthCredentials
putBearerAuthCredentials
addTo, addTo, addTo, addTo, addTo, addTo, getFirst, getFirst, put, put, put, put, toField, toField, withAddTo, withAddTo, withAddTo, withAddTo, withAddTo, withAddTo, withPut, withPut, withPut, withPut, withPut, withPut
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entry, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, of, of, of, of, of, of, of, of, of, of, of, ofEntries, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
static final String BASIC_REALM
default List<HttpMethod> getAllowMethods()
HeaderField.ALLOW
:
"... The Allow entity-Header-Field lists the set of methods supported by
the resource ... The purpose of this field is strictly to inform the
recipient of valid methods associated with the resource. An Allow header
field MUST be present in a 405 (Method Not Allowed) response ..."default List<HttpMethod> putAllowMethods(HttpMethod... aHttpMethods)
HeaderField.ALLOW
:
"... The Allow entity-Header-Field lists the set of methods supported by
the resource ... The purpose of this field is strictly to inform the
recipient of valid methods associated with the resource. An Allow header
field MUST be present in a 405 (Method Not Allowed) response ..."aHttpMethods
- The HTTP-Methods allowed for the resource.default List<HttpMethod> putAllowMethods(List<HttpMethod> aHttpMethods)
HeaderField.ALLOW
:
"... The Allow entity-Header-Field lists the set of methods supported by
the resource ... The purpose of this field is strictly to inform the
recipient of valid methods associated with the resource. An Allow header
field MUST be present in a 405 (Method Not Allowed) response ..."aHttpMethods
- The HTTP-Methods allowed for the resource.default B withAllowMethods(HttpMethod... aHttpMethods)
HeaderField.ALLOW
:
"... The Allow entity-Header-Field lists the set of methods supported by
the resource ... The purpose of this field is strictly to inform the
recipient of valid methods associated with the resource. An Allow header
field MUST be present in a 405 (Method Not Allowed) response ..."aHttpMethods
- The HTTP-Methods allowed for the resource.default B withAllowMethods(List<HttpMethod> aHttpMethods)
HeaderField.ALLOW
:
"... The Allow entity-Header-Field lists the set of methods supported by
the resource ... The purpose of this field is strictly to inform the
recipient of valid methods associated with the resource. An Allow header
field MUST be present in a 405 (Method Not Allowed) response ..."aHttpMethods
- The HTTP-Methods allowed for the resource.default List<HttpMethod> removeAllowMethods()
HeaderField.ALLOW
:
"... The Allow entity-Header-Field lists the set of methods supported by
the resource ... The purpose of this field is strictly to inform the
recipient of valid methods associated with the resource. An Allow header
field MUST be present in a 405 (Method Not Allowed) response ..."default ContentType getContentType()
HeaderField.CONTENT_TYPE
:
"... The Content-Type entity-Header-Field indicates the media type of the
entity-body sent to the recipient ..."default List<String> getUnknownContentTypes()
HeaderField.CONTENT_TYPE
. E.g. the ones which cannot be mapped by
the enumeration MediaType
.getContentType()
default ContentType putContentType(HttpMediaType aHttpMediaType)
HeaderField.CONTENT_TYPE
. You may pass a MediaType
or a
ContentType
instance as them both implement the
HttpMediaTypeAccessor.HttpMediaTypeProvider
interface:
"... The Content-Type entity-Header-Field indicates the media type of the
entity-body sent to the recipient ..."aHttpMediaType
- The media type used for the body.default ContentType putContentType(MediaType aMediaType, Map<String,String> aParameters)
HeaderField.CONTENT_TYPE
. :
"... The Content-Type entity-Header-Field indicates the media type of the
entity-body sent to the recipient ..."aMediaType
- The media type used for the body.aParameters
- The Content-Type's parameters.default B withContentType(HttpMediaType aHttpMediaType)
HeaderField.CONTENT_TYPE
. You may pass a MediaType
or a
ContentType
instance as them both implement the
HttpMediaTypeAccessor.HttpMediaTypeProvider
interface:
"... The Content-Type entity-Header-Field indicates the media type of the
entity-body sent to the recipient ..."aHttpMediaType
- The media type used for the body.default B withContentType(MediaType aMediaType, Map<String,String> aParameters)
MediaType
and the parameters for the HTTP
body.aMediaType
- The media type used for the body.aParameters
- The Content-Type's parameters.default ContentType removeContentType()
HeaderField.CONTENT_TYPE
. :
"... The Content-Type entity-Header-Field indicates the media type of the
entity-body sent to the recipient ..."default List<ContentType> getAcceptTypes()
HeaderField.ACCEPT
:
"... The Accept request-Header-Field can be used to specify certain media
types which are acceptable for the response. Accept headers can be used
to indicate that the request is specifically limited to a small set of
desired ..."MediaType
and the
according parameters (being actually instances of the
ContentType
type).default List<String> getUnknownAcceptTypes()
HeaderField.ACCEPT
. E.g. the ones which cannot be mapped by the
enumeration MediaType
.getAcceptTypes()
default List<ContentType> putAcceptTypes(HttpMediaType... aHttpMediaType)
HeaderField.ACCEPT
. You may
pass a MediaType
or a ContentType
instance as them both
implement the HttpMediaTypeAccessor.HttpMediaTypeProvider
interface:
"... The Accept request-Header-Field can be used to specify certain media
types which are acceptable for the response. Accept headers can be used
to indicate that the request is specifically limited to a small set of
desired types ..."aHttpMediaType
- The according HttpMediaTypeAccessor.HttpMediaTypeProvider
.default List<ContentType> putAcceptTypes(List<? extends HttpMediaType> aHttpMediaTypes)
HeaderField.ACCEPT
. You may
pass a MediaType
or a ContentType
instance as them both
implement the HttpMediaTypeAccessor.HttpMediaTypeProvider
interface:
"... The Accept request-Header-Field can be used to specify certain media
types which are acceptable for the response. Accept headers can be used
to indicate that the request is specifically limited to a small set of
desired types ..."aHttpMediaTypes
- The according HttpMediaTypeAccessor.HttpMediaTypeProvider
.default B withAcceptTypes(HttpMediaType... aHttpMediaType)
HeaderField.ACCEPT
. You may
pass a MediaType
or a ContentType
instance as them both
implement the HttpMediaTypeAccessor.HttpMediaTypeProvider
interface:
"... The Accept request-Header-Field can be used to specify certain media
types which are acceptable for the response. Accept headers can be used
to indicate that the request is specifically limited to a small set of
desired types ..."aHttpMediaType
- The according HttpMediaTypeAccessor.HttpMediaTypeProvider
.default B withAcceptTypes(List<? extends HttpMediaType> aHttpMediaType)
HeaderField.ACCEPT
. You may
pass a MediaType
or a ContentType
instance as them both
implement the HttpMediaTypeAccessor.HttpMediaTypeProvider
interface:
"... The Accept request-Header-Field can be used to specify certain media
types which are acceptable for the response. Accept headers can be used
to indicate that the request is specifically limited to a small set of
desired types ..."aHttpMediaType
- The according HttpMediaTypeAccessor.HttpMediaTypeProvider
.default List<ContentType> removeAcceptTypes()
HeaderField.ACCEPT
:
"... The Accept request-Header-Field can be used to specify certain media
types which are acceptable for the response. Accept headers can be used
to indicate that the request is specifically limited to a small set of
desired types ..."default List<String> getAcceptCharsets()
HeaderField.ACCEPT_CHARSET
.
"... The Accept-Charset request-Header-Field can be used to indicate what
character sets are acceptable for the response. This field allows clients
capable of understanding more comprehensive or special- purpose character
sets to signal that capability to a server which is capable of
representing documents in those character sets ..."default List<String> putAcceptCharsets(String... aAcceptCharsets)
HeaderField.ACCEPT_CHARSET
.
"... The Accept-Charset request-Header-Field can be used to indicate what
character sets are acceptable for the response. This field allows clients
capable of understanding more comprehensive or special- purpose character
sets to signal that capability to a server which is capable of
representing documents in those character sets ..."aAcceptCharsets
- The Accept-Charset expected by a client from a
server.default List<String> putAcceptCharsets(List<String> aAcceptCharsets)
HeaderField.ACCEPT_CHARSET
.
"... The Accept-Charset request-Header-Field can be used to indicate what
character sets are acceptable for the response. This field allows clients
capable of understanding more comprehensive or special- purpose character
sets to signal that capability to a server which is capable of
representing documents in those character sets ..."aAcceptCharsets
- The Accept-Charset expected by a client from a
server.default B withAcceptCharsets(List<String> aAcceptCharsets)
HeaderField.ACCEPT_CHARSET
.
"... The Accept-Charset request-Header-Field can be used to indicate what
character sets are acceptable for the response. This field allows clients
capable of understanding more comprehensive or special- purpose character
sets to signal that capability to a server which is capable of
representing documents in those character sets ..."aAcceptCharsets
- The Accept-Charset expected by a client from a
server.default B withAcceptCharsets(String... aAcceptCharsets)
HeaderField.ACCEPT_CHARSET
.
"... The Accept-Charset request-Header-Field can be used to indicate what
character sets are acceptable for the response. This field allows clients
capable of understanding more comprehensive or special- purpose character
sets to signal that capability to a server which is capable of
representing documents in those character sets ..."aAcceptCharsets
- The Accept-Charset expected by a client from a
server.default List<String> removeAcceptCharsets()
HeaderField.ACCEPT_CHARSET
.
"... The Accept-Charset request-Header-Field can be used to indicate what
character sets are acceptable for the response. This field allows clients
capable of understanding more comprehensive or special- purpose character
sets to signal that capability to a server which is capable of
representing documents in those character sets ..."default List<ContentEncoding> getAcceptEncodings()
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."default List<ContentEncoding> putAcceptEncodings(ContentEncoding... aEncodings)
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."aEncodings
- The according encodings.default List<ContentEncoding> putAcceptEncodings(List<ContentEncoding> aEncodings)
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."aEncodings
- The according encodings.default B withAcceptEncodings(ContentEncoding... aEncodings)
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."aEncodings
- The according encodings.default B withAcceptEncodings(List<ContentEncoding> aEncodings)
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."aEncodings
- The according encodings.default List<ContentEncoding> removeAcceptEncodings()
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."default ContentEncoding getContentEncoding()
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."default ContentEncoding putContentEncoding(ContentEncoding aEncoding)
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."aEncoding
- The HTTP body's content encoding.default B withContentEncoding(ContentEncoding aEncoding)
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."aEncoding
- The HTTP body's content encoding.default ContentEncoding removeContentEncoding()
HeaderField.CONTENT_ENCODING
:
"... The Content-Encoding entity-Header-Field is used as a modifier to
the media-type. When present, its value indicates what additional content
codings have been applied to the entity-body, and thus what decoding
mechanisms must be applied in order to obtain the media-type referenced
by the Content-Type Header-Field. Content-Encoding is primarily used to
allow a document to be compressed without losing the identity of its
underlying media type ..."default String getUserAgent()
HeaderField.USER_AGENT
:
"... The User-Agent request-Header-Field contains information about the
user agent originating the request. This is for statistical purposes, the
tracing of protocol violations, and automated recognition of user agents
for the sake of tailoring responses to avoid particular user agent
limitations. User agents SHOULD include this field with requests ..."default String putUserAgent(String aUserAgent)
HeaderField.USER_AGENT
:
"... The User-Agent request-Header-Field contains information about the
user agent originating the request. This is for statistical purposes, the
tracing of protocol violations, and automated recognition of user agents
for the sake of tailoring responses to avoid particular user agent
limitations. User agents SHOULD include this field with requests ..."aUserAgent
- The according user agent.default B withUserAgent(String aUserAgent)
HeaderField.USER_AGENT
:
"... The User-Agent request-Header-Field contains information about the
user agent originating the request. This is for statistical purposes, the
tracing of protocol violations, and automated recognition of user agents
for the sake of tailoring responses to avoid particular user agent
limitations. User agents SHOULD include this field with requests ..."aUserAgent
- The according user agent.default String removeUserAgent()
HeaderField.USER_AGENT
:
"... The User-Agent request-Header-Field contains information about the
user agent originating the request. This is for statistical purposes, the
tracing of protocol violations, and automated recognition of user agents
for the sake of tailoring responses to avoid particular user agent
limitations. User agents SHOULD include this field with requests ..."default String getHost()
HeaderField.HOST
:
"... The Host request-Header-Field specifies the Internet host and port
number of the resource being requested, as obtained from the original URI
given by the user or referring resource ..."default String putHost(String aHost)
HeaderField.HOST
:
"... The Host request-Header-Field specifies the Internet host and port
number of the resource being requested, as obtained from the original URI
given by the user or referring resource ..."aHost
- The according host.default B withHost(String aHost)
HeaderField.HOST
:
"... The Host request-Header-Field specifies the Internet host and port
number of the resource being requested, as obtained from the original URI
given by the user or referring resource ..."aHost
- The according host.default String removeHost()
HeaderField.HOST
:
"... The Host request-Header-Field specifies the Internet host and port
number of the resource being requested, as obtained from the original URI
given by the user or referring resource ..."default String getRequestId()
HeaderField.REQUEST_ID
:
A Request-Correlation ID is an ID to uniquely identify an entity
(request) across multiple systems.default String putRequestId(String aRequestId)
HeaderField.REQUEST_ID
:
A Request-Correlation ID is an ID to uniquely identify an entity
(request) across multiple systems.aRequestId
- The according Request-Correlation ID.default B withRequestId(String aRequestId)
HeaderField.REQUEST_ID
:
A Request-Correlation ID is an ID to uniquely identify an entity
(request) across multiple systems.aRequestId
- The according Request-Correlation ID.default String removeRequestId()
HeaderField.REQUEST_ID
:
A Request-Correlation ID is an ID to uniquely identify an entity
(request) across multiple systems.default String getSessionId()
HeaderField.SESSION_ID
:
A Session-Correlation ID is an ID to uniquely identify an entity
(session) across multiple systems.default String putSessionId(String aSessionId)
HeaderField.SESSION_ID
:
A Session-Correlation ID is an ID to uniquely identify an entity
(session) across multiple systems.aSessionId
- The according Session-Correlation ID.default B withSessionId(String aSessionId)
HeaderField.SESSION_ID
:
A Session-Correlation ID is an ID to uniquely identify an entity
(session) across multiple systems.aSessionId
- The according Session-Correlation ID.default String removeSessionId()
HeaderField.SESSION_ID
:
A Session-Correlation ID is an ID to uniquely identify an entity
(session) across multiple systems.default String getAuthenticate()
HeaderField.WWW_AUTHENTICATE
:
"... The WWW-Authenticate response-Header-Field MUST be included in 401
(Unauthorized) response messages. The field value consists of at least
one challenge that indicates the authentication scheme(s) and parameters
applicable to the Request-URI ..."default String putAuthenticate(String aAuthenticate)
HeaderField.WWW_AUTHENTICATE
:
"... The WWW-Authenticate response-Header-Field MUST be included in 401
(Unauthorized) response messages. The field value consists of at least
one challenge that indicates the authentication scheme(s) and parameters
applicable to the Request-URI ..."aAuthenticate
- The according WWW-Authenticate field.default B withAuthenticate(String aAuthenticate)
HeaderField.WWW_AUTHENTICATE
:
"... The WWW-Authenticate response-Header-Field MUST be included in 401
(Unauthorized) response messages. The field value consists of at least
one challenge that indicates the authentication scheme(s) and parameters
applicable to the Request-URI ..."aAuthenticate
- The according WWW-Authenticate field.default String removeAuthenticate()
HeaderField.WWW_AUTHENTICATE
:
"... The WWW-Authenticate response-Header-Field MUST be included in 401
(Unauthorized) response messages. The field value consists of at least
one challenge that indicates the authentication scheme(s) and parameters
applicable to the Request-URI ..."default String getBasicAuth()
getAuthenticate()
to get the field's value no matter which kind
of authenticate is used.default String putBasicAuthRequired(String aRealm)
aRealm
- The realm to be set for Basic-Authentication of the
WWW-authenticate field.default B withBasicAuthRequired(String aRealm)
aRealm
- The realm to be set for Basic-Authentication of the
WWW-authenticate field.default String removeBasicAuthenticate()
removeAuthenticate()
to remove the
field's value no matter which kind of authenticate is used.default String toBasicAuthRealm()
HeaderField.WWW_AUTHENTICATE
Header-Field (getAuthenticate()
).default BearerAuthCredentials getBearerAuthCredentials()
BearerAuthCredentials
from the request (or null if
there are none such credentials). Throw an UnauthorizedException
in case you do not agree with the credentials you find there.getBearerAuthCredentials
in interface BearerAuthCredentialsAccessor
BearerAuthCredentials
stored by the bearer
authentication credentials property (or null if there are none
such credentials).default BearerAuthCredentials putBearerAuthCredentials(BearerAuthCredentials aBearerAuthCredentials)
BearerAuthCredentials
(token) for HTTP bearer
authentication.putBearerAuthCredentials
in interface BearerAuthCredentialsAccessor.BearerAuthCredentialsMutator
aBearerAuthCredentials
- The credentials (token).default B withBearerAuthCredentials(BearerAuthCredentials aBearerAuthCredentials)
BearerAuthCredentials
(token) for HTTP bearer
authentication.withBearerAuthCredentials
in interface BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<C extends Cookie>
aBearerAuthCredentials
- The credentials (token).default B withBearerAuthCredentials(String aToken)
withBearerAuthCredentials
in interface BearerAuthCredentialsAccessor.BearerAuthCredentialsBuilder<C extends Cookie>
aToken
- The password part of the credentials.default BearerAuthCredentials removeBearerAuthCredentials()
BearerAuthCredentials
(token) for HTTP bearer
authentication.default BasicAuthCredentials getBasicAuthCredentials()
BasicAuthCredentials
from the request (or null if
there are none such credentials). Throw an UnauthorizedException
in case you do not agree with the credentials you find there.getBasicAuthCredentials
in interface BasicAuthCredentialsAccessor
BasicAuthCredentials
stored by the basic
authentication credentials property (or null if there are none
such credentials).default BasicAuthCredentials putBasicAuthCredentials(BasicAuthCredentials aBasicAuthCredentials)
BasicAuthCredentials
(user name and secret) for HTTP
Basic-Authentication.putBasicAuthCredentials
in interface BasicAuthCredentialsAccessor.BasicAuthCredentialsMutator
aBasicAuthCredentials
- The credentials (user name and secret).default B withBasicAuthCredentials(BasicAuthCredentials aBasicAuthCredentials)
BasicAuthCredentials
(user name and secret) for HTTP
Basic-Authentication.withBasicAuthCredentials
in interface BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<C extends Cookie>
aBasicAuthCredentials
- The credentials (user name and secret).default B withBasicAuthCredentials(String aUserName, String aSecret)
withBasicAuthCredentials
in interface BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<C extends Cookie>
aUserName
- The user name part of the credentials.aSecret
- The password part of the credentials.default BasicAuthCredentials removeBasicAuthCredentials()
BasicAuthCredentials
(user name and secret) for HTTP
Basic-Authentication.default List<String> get(HeaderField aHeaderField)
aHeaderField
- The Header-Fielddefault String getFirst(HeaderField aHeaderField)
aHeaderField
- The a Header-Fielddefault void addTo(HeaderField aHeaderField, String aValue)
aHeaderField
- The Header-Field.aValue
- The a value to be added.default HeaderFields<C,B> withAddTo(HeaderField aHeaderField, String aValue)
addTo(HeaderField, String)
.aHeaderField
- the Header-FieldaValue
- the valuedefault void addTo(HeaderField aHeaderField, String... aValues)
aHeaderField
- The Header-Field.aValues
- The a values to be added.default void addTo(HeaderField aHeaderField, List<String> aValues)
aHeaderField
- The Header-Field.aValues
- The a values to be added.default HeaderFields<C,B> withAddTo(HeaderField aHeaderField, String... aValues)
addTo(HeaderField, String ...)
.aHeaderField
- the Header-FieldaValues
- the valuesdefault HeaderFields<C,B> withAddTo(HeaderField aHeaderField, List<String> aValues)
addTo(HeaderField, List)
.aHeaderField
- the Header-FieldaValues
- the valuesdefault List<String> put(HeaderField aHeaderField, String aValue)
aHeaderField
- The a Header-Field.aValue
- The value with which to replace the currently set
Header-Field values.List
with the previously set Header-Field values.default HeaderFields<C,B> withPut(HeaderField aHeaderField, String aValue)
put(HeaderField, String)
.aHeaderField
- The Header-Field.aValue
- The value.default List<String> put(HeaderField aHeaderField, String... aValues)
aHeaderField
- The a Header-Field.aValues
- The values with which to replace the currently set
Header-Field values.List
with the previously set Header-Field values.default List<String> put(HeaderField aHeaderField, List<String> aValues)
aHeaderField
- The a Header-Field.aValues
- The values with which to replace the currently set
Header-Field values.List
with the previously set Header-Field values.default HeaderFields<C,B> withPut(HeaderField aHeaderField, String... aValues)
put(HeaderField, String ...)
.aHeaderField
- The Header-Field.aValues
- The values.default HeaderFields<C,B> withPut(HeaderField aHeaderField, List<String> aValues)
put(HeaderField, List)
.aHeaderField
- The Header-Field.aValues
- The values.default List<String> remove(HeaderField aHeaderField)
aHeaderField
- The a Header-Field for which to remove the values.List
with the previously set Header-Field values.C addCookie(String aHttpCookie)
ResponseHeaderFields
instance. The server-side cookies are
retrieved from the HeaderField.SET_COOKIE
Header-Field.
WITH THE METHOD getAllCookies()
and getCookies(String)
as well as getFirstCookie(String)
ONLY THE COOKIES SENT BY THE
CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELD
HeaderField.COOKIE
). COOKIES SET VIA
addCookie(String, String)
OR
withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE
COOKIES BEING SET SERVER-SIDE ARE PUT IN THE
HeaderField.SET_COOKIE
Header-Field.aHttpCookie
- The HTTP-Cookie String
to be paresd as a
cookie.ResponseHeaderFields
instance!IllegalArgumentException
- thrown in case the HTTP-Cookie
String
cannot be parsed as a cookie.C addCookie(String aCookieName, String aValue)
ResponseHeaderFields
instance. The server-side cookies are
retrieved from the HeaderField.SET_COOKIE
Header-Field.
WITH THE METHOD getAllCookies()
and getCookies(String)
as well as getFirstCookie(String)
ONLY THE COOKIES SENT BY THE
CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELD
HeaderField.COOKIE
). COOKIES SET VIA
addCookie(String, String)
OR
withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE
COOKIES BEING SET SERVER-SIDE ARE PUT IN THE
HeaderField.SET_COOKIE
Header-Field.aCookieName
- The name for the cookie to be added.aValue
- The value of the cookie to be added.ResponseHeaderFields
instance!C addCookie(C aCookie)
ResponseHeaderFields
instance. The server-side cookies are
retrieved from the HeaderField.SET_COOKIE
Header-Field.
WITH THE METHOD getAllCookies()
and getCookies(String)
as well as getFirstCookie(String)
ONLY THE COOKIES SENT BY THE
CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELD
HeaderField.COOKIE
). COOKIES SET VIA
addCookie(String, String)
OR
withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE
COOKIES BEING SET SERVER-SIDE ARE PUT IN THE
HeaderField.SET_COOKIE
Header-Field.aCookie
- The cookie to be added.ResponseHeaderFields
instance!default HeaderFields<C,B> withAddCookie(String aCookieName, String aValue)
addCookie(String, String)
method.
WITH THE METHOD getAllCookies()
and getCookies(String)
as well as getFirstCookie(String)
ONLY THE COOKIES SENT BY THE
CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELD
HeaderField.COOKIE
). COOKIES SET VIA
addCookie(String, String)
OR
withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE
COOKIES BEING SET SERVER-SIDE ARE PUT IN THE
HeaderField.SET_COOKIE
Header-Field.aCookieName
- The name for the cookie to be added.aValue
- The value of the cookie to be added.ResponseHeaderFields
instance to continue building
up the Header-Fields.default HeaderFields<C,B> withAddCookie(C aCookie)
addCookie(Cookie)
method.
WITH THE METHOD getAllCookies()
and getCookies(String)
as well as getFirstCookie(String)
ONLY THE COOKIES SENT BY THE
CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELD
HeaderField.COOKIE
). COOKIES SET VIA
addCookie(String, String)
OR
withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE
COOKIES BEING SET SERVER-SIDE ARE PUT IN THE
HeaderField.SET_COOKIE
Header-Field.aCookie
- The cookie to be added.ResponseHeaderFields
instance to continue building
up the Header-Fields.List<C> getAllCookies()
RequestHeaderFields
instance. If no cookie has been found, then
an empty array is returned. The client-side cookies are retrieved from
the HeaderField.COOKIE
Header-Field.
WITH THE METHOD getAllCookies()
and getCookies(String)
as well as getFirstCookie(String)
ONLY THE COOKIES SENT BY THE
CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELD
HeaderField.COOKIE
). COOKIES SET VIA
addCookie(String, String)
OR
withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE
COOKIES BEING SET SERVER-SIDE ARE PUT IN THE
HeaderField.SET_COOKIE
Header-Field.
According to the Netscape cookie_spec
(https://curl.haxx.se/rfc/cookie_spec.html) the entire NAME=VALUE string
of a cookie is a sequence of characters excluding semi-colon, comma and
white space.RequestHeaderFields
instance.default List<C> getCookies(String aCookieName)
RequestHeaderFields
instance. The client-side cookies are
retrieved from the HeaderField.COOKIE
Header-Field.
WITH THE METHOD getAllCookies()
and getCookies(String)
as well as getFirstCookie(String)
ONLY THE COOKIES SENT BY THE
CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELD
HeaderField.COOKIE
). COOKIES SET VIA
addCookie(String, String)
OR
withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE
COOKIES BEING SET SERVER-SIDE ARE PUT IN THE
HeaderField.SET_COOKIE
Header-Field.aCookieName
- The name of the cookie to be retrieved.default C getFirstCookie(String aCookieName)
getAllCookies()
though just returning the first cookie.
WITH THE METHOD getAllCookies()
and getCookies(String)
as well as getFirstCookie(String)
ONLY THE COOKIES SENT BY THE
CLIENT CAN BE RETRIEVED (E.G. COOKIES RESIDING IN THE HEADER FIELD
HeaderField.COOKIE
). COOKIES SET VIA
addCookie(String, String)
OR
withAddCookie(String, String)
CANNOT BE RETRIEVED, AS THE
COOKIES BEING SET SERVER-SIDE ARE PUT IN THE
HeaderField.SET_COOKIE
Header-Field.aCookieName
- The name of the cookie to be retrieved.default String[] toHttpCookies()
Cookie
instances.Copyright © 2018. All rights reserved.