public interface HeaderFields<C extends Cookie,B extends HeaderFields<C,B>> extends HttpFields<B>, BasicAuthCredentialsAccessor.BasicAuthCredentialsProperty, BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<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
Modifier and Type | Field and Description |
---|---|
static String |
BASIC_REALM |
Modifier and Type | Method and 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,
List<String> aValues) |
default void |
addTo(HeaderField aHeaderField,
String... aValues) |
default void |
addTo(HeaderField aHeaderField,
String aValue) |
default List<String> |
get(HeaderField aHeaderField) |
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 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 |
getCorrelationId()
Gets the (interprocess) correlation ID field
HeaderField.CORRELATION_ID :
A correlation ID is an ID to uniquely identify an entity (request) across
multiple systems. |
default String |
getFirst(HeaderField aHeaderField) |
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 |
getUserAgent()
Gets the User-Agent request-header field
HeaderField.USER_AGENT :
"... |
default void |
put(HeaderField aHeaderField,
List<String> aValues) |
default void |
put(HeaderField aHeaderField,
String... aValues) |
default List<String> |
put(HeaderField aHeaderField,
String aValue) |
default List<String> |
putAcceptCharsets(List<String> aAcceptCharsets)
Sets the Accept-Charset request-header field
HeaderField.ACCEPT_CHARSET |
default List<String> |
putAcceptCharsets(String... aAcceptCharsets)
Sets the Accept-Charset request-header field
HeaderField.ACCEPT_CHARSET |
default List<ContentEncoding> |
putAcceptEncodings(ContentEncoding... aEncodings)
Sets the the Content-Encoding entity-header field
HeaderField.CONTENT_ENCODING :
"... |
default List<ContentEncoding> |
putAcceptEncodings(List<ContentEncoding> aEncodings)
Sets the the Content-Encoding entity-header field
HeaderField.CONTENT_ENCODING :
"... |
default List<ContentType> |
putAcceptTypes(HttpMediaType... aHttpMediaType)
Sets the Accept request-header field
HeaderField.ACCEPT . |
default List<ContentType> |
putAcceptTypes(List<? extends HttpMediaType> aHttpMediaTypes)
Sets the Accept request-header field
HeaderField.ACCEPT . |
default List<HttpMethod> |
putAllowMethods(HttpMethod... aHttpMethods)
Sets the Allow entity-header field
HeaderField.ALLOW :
"... |
default List<HttpMethod> |
putAllowMethods(List<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 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,
org.refcodes.collection.Properties aParameters)
Sets the Content-Type entity-header field
HeaderField.CONTENT_TYPE . :
"... |
default String |
putCorrelationId(String aCorrelationId)
Sets the (interprocess) correlation ID field
HeaderField.CORRELATION_ID :
A correlation ID is an ID to uniquely identify an entity (request) across
multiple systems. |
default String |
putHost(String aHost)
Sets the Host request-header field
HeaderField.HOST :
"... |
default String |
putUserAgent(String aUserAgent)
Sets the User-Agent request-header field
HeaderField.USER_AGENT :
"... |
default List<String> |
remove(HeaderField aHeaderField) |
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 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 |
removeCorrelationId()
Removes the (interprocess) correlation ID field
HeaderField.CORRELATION_ID :
A correlation ID is an ID to uniquely identify an entity (request) across
multiple systems. |
default String |
removeHost()
Removes the Host request-header field
HeaderField.HOST :
"... |
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(List<String> aAcceptCharsets)
Sets the the Accept-Charset request-header field
HeaderField.ACCEPT_CHARSET |
default B |
withAcceptCharsets(String... aAcceptCharsets)
Sets the Accept-Charset request-header field
HeaderField.ACCEPT_CHARSET |
default B |
withAcceptEncodings(ContentEncoding... aEncodings)
Sets the the Content-Encoding entity-header field
HeaderField.CONTENT_ENCODING :
"... |
default B |
withAcceptEncodings(List<ContentEncoding> aEncodings)
Sets the the Content-Encoding entity-header field
HeaderField.CONTENT_ENCODING :
"... |
default B |
withAcceptTypes(HttpMediaType... aHttpMediaType)
Sets the Accept request-header field
HeaderField.ACCEPT . |
default B |
withAcceptTypes(List<? extends 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,
List<String> aValues) |
default HeaderFields<C,B> |
withAddTo(HeaderField aHeaderField,
String... aValues) |
default HeaderFields<C,B> |
withAddTo(HeaderField aHeaderField,
String aValue) |
default B |
withAllowMethods(HttpMethod... aHttpMethods)
Sets the Allow entity-header field
HeaderField.ALLOW :
"... |
default B |
withAllowMethods(List<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(BasicAuthCredentials aBasicAuthCredentials)
Sets the
BasicAuthCredentials (user name and secret) for HTTP
basic authentication. |
default B |
withBasicAuthCredentials(String aUserName,
String aSecret)
Sets the user name and secret (password) for HTTP basic authentication.
|
default B |
withBasicAuthRequired(String aRealm)
Sets the WWW-Authenticate field for basic authentication with the given
realm.
|
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,
org.refcodes.collection.Properties aParameters)
Sets the Content-Type's
MediaType and the parameters for the HTTP
body. |
default B |
withCorrelationId(String aCorrelationId)
Sets the (interprocess) correlation ID field
HeaderField.CORRELATION_ID :
A correlation ID is an ID to uniquely identify an entity (request) across
multiple systems. |
default B |
withHost(String aHost)
Sets the Host request-header field
HeaderField.HOST :
"... |
default HeaderFields<C,B> |
withPut(HeaderField aHeaderField,
List<String> aValues) |
default HeaderFields<C,B> |
withPut(HeaderField aHeaderField,
String... aValues) |
default HeaderFields<C,B> |
withPut(HeaderField aHeaderField,
String aValue) |
default B |
withUserAgent(String aUserAgent)
Sets he User-Agent request-header field
HeaderField.USER_AGENT :
"... |
addTo, addTo, addTo, getFirst, put, put, toField, withAddTo, withAddTo, withAddTo, withPut, withPut, withPut
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
putBasicAuthCredentials
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 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, org.refcodes.collection.Properties 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, org.refcodes.collection.Properties 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<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 getCorrelationId()
HeaderField.CORRELATION_ID
:
A correlation ID is an ID to uniquely identify an entity (request) across
multiple systems.default String putCorrelationId(String aCorrelationId)
HeaderField.CORRELATION_ID
:
A correlation ID is an ID to uniquely identify an entity (request) across
multiple systems.aCorrelationId
- The according correlation ID.default B withCorrelationId(String aCorrelationId)
HeaderField.CORRELATION_ID
:
A correlation ID is an ID to uniquely identify an entity (request) across
multiple systems.aCorrelationId
- The according correlation ID.default String removeCorrelationId()
HeaderField.CORRELATION_ID
:
A correlation ID is an ID to uniquely identify an entity (request) 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 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).BasicAuthCredentials
or null if
none have been set.default B withBasicAuthCredentials(BasicAuthCredentials aBasicAuthCredentials)
BasicAuthCredentials
(user name and secret) for HTTP
basic authentication.withBasicAuthCredentials
in interface BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B extends HeaderFields<C,B>>
aBasicAuthCredentials
- The credentials (user name and secret).default B withBasicAuthCredentials(String aUserName, String aSecret)
withBasicAuthCredentials
in interface BasicAuthCredentialsAccessor.BasicAuthCredentialsBuilder<B extends HeaderFields<C,B>>
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)
#get(String)
default String getFirst(HeaderField aHeaderField)
HttpFields.getFirst(String)
default void addTo(HeaderField aHeaderField, String aValue)
HttpFields.addTo(String, String)
default HeaderFields<C,B> withAddTo(HeaderField aHeaderField, String aValue)
HttpFields.withAddTo(String, String)
default void addTo(HeaderField aHeaderField, String... aValues)
HttpFields.addTo(String, String...)
default void addTo(HeaderField aHeaderField, List<String> aValues)
HttpFields.addTo(String, List)
default HeaderFields<C,B> withAddTo(HeaderField aHeaderField, String... aValues)
HttpFields.withAddTo(String, String...)
default HeaderFields<C,B> withAddTo(HeaderField aHeaderField, List<String> aValues)
HttpFields.withAddTo(String, List)
default List<String> put(HeaderField aHeaderField, String aValue)
HttpFields.put(String, String)
default HeaderFields<C,B> withPut(HeaderField aHeaderField, String aValue)
HttpFields.withPut(String, String)
default void put(HeaderField aHeaderField, String... aValues)
HttpFields.put(String, String...)
default void put(HeaderField aHeaderField, List<String> aValues)
#put(String, List)
default HeaderFields<C,B> withPut(HeaderField aHeaderField, String... aValues)
HttpFields.withPut(String, String...)
default HeaderFields<C,B> withPut(HeaderField aHeaderField, List<String> aValues)
HttpFields.withPut(String, List)
default List<String> remove(HeaderField aHeaderField)
Map.remove(Object)
C addCookie(String aHttpCookie)
ResponseHeaderFields
instance. The server-side cookies are
retrieved from the #HEADER_SET_FIELD_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
#HEADER_FIELD_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 #HEADER_FIELD_COOKIE
.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 #HEADER_SET_FIELD_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
#HEADER_FIELD_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 #HEADER_FIELD_COOKIE
.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 #HEADER_SET_FIELD_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
#HEADER_FIELD_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 #HEADER_FIELD_COOKIE
.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
#HEADER_FIELD_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 #HEADER_FIELD_COOKIE
.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
#HEADER_FIELD_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 #HEADER_FIELD_COOKIE
.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 #HEADER_FIELD_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
#HEADER_FIELD_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 #HEADER_FIELD_COOKIE
.
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 #HEADER_FIELD_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
#HEADER_FIELD_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 #HEADER_FIELD_COOKIE
.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
#HEADER_FIELD_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 #HEADER_FIELD_COOKIE
.aCookieName
- The name of the cookie to be retrieved.default String[] toHttpCookies()
Cookie
instances.Copyright © 2017. All rights reserved.