public interface HttpMetaData
| Modifier and Type | Method and Description |
|---|---|
default HttpMetaData |
addCookie(CharSequence name,
CharSequence value)
|
default HttpMetaData |
addCookie(HttpCookiePair cookie)
Adds a cookie.
|
default HttpMetaData |
addHeader(CharSequence name,
CharSequence value)
Adds a new header with the specified
name and value. |
default HttpMetaData |
addHeaders(HttpHeaders headers)
Adds all header names and values of
headers object. |
default HttpMetaData |
addSetCookie(CharSequence name,
CharSequence value)
|
default HttpMetaData |
addSetCookie(HttpSetCookie cookie)
Adds a set-cookie.
|
ContentCodec |
encoding()
Returns the
ContentCodec used to encode the payload of a request or a response. |
HttpMetaData |
encoding(ContentCodec encoding)
The
ContentCodec used to encode the payload of a request or a response. |
HttpHeaders |
headers()
Returns the headers of this message.
|
default HttpMetaData |
setHeader(CharSequence name,
CharSequence value)
Sets a header with the specified
name and value. |
default HttpMetaData |
setHeaders(HttpHeaders headers)
Clears the current header entries and copies all header entries of the specified
headers object. |
String |
toString()
Returns a string representation of the message.
|
default String |
toString(BiFunction<? super CharSequence,? super CharSequence,CharSequence> headerFilter)
Returns a string representation of the message and headers.
|
HttpProtocolVersion |
version()
Returns the protocol version of this
HttpMetaData. |
HttpMetaData |
version(HttpProtocolVersion version)
Set the protocol version of this
HttpMetaData. |
HttpProtocolVersion version()
HttpMetaData.HttpMetaData version(HttpProtocolVersion version)
HttpMetaData.version - the protocol version to set.this.HttpHeaders headers()
HttpMetaData encoding(ContentCodec encoding)
ContentCodec used to encode the payload of a request or a response.
If the endpoint is setup with ContentCodingHttpServiceFilter, the server will
auto-establish the accepted encoding for the response, unless the caller provides a specific encoding
by calling this method.
Any encoding passed here, takes precedence. In other words, a compressed response, can
be disabled by passing ContentCodings.identity().encoding - The ContentCodec used for the encoding of the payload.this.@Nullable ContentCodec encoding()
ContentCodec used to encode the payload of a request or a response.ContentCodec used for the encoding of the payload.default HttpMetaData addHeader(CharSequence name, CharSequence value)
name and value.name - the name of the header.value - the value of the header.this.default HttpMetaData addHeaders(HttpHeaders headers)
headers object.headers - the headers to add.this.default HttpMetaData setHeader(CharSequence name, CharSequence value)
name and value. Any existing headers with the same name are
overwritten.name - the name of the header.value - the value of the header.this.default HttpMetaData setHeaders(HttpHeaders headers)
headers object.headers - the headers object which contains new values.this.default HttpMetaData addCookie(HttpCookiePair cookie)
This may result in multiple HttpCookiePairs with same name.
cookie - the cookie to add.this.default HttpMetaData addCookie(CharSequence name, CharSequence value)
name and
value.
This may result in multiple HttpSetCookies with same name. Added cookie will not be wrapped, not secure,
and not HTTP-only, with no path, domain, expire date and maximum age.
name - the name of the cookie.value - the value of the cookie.this.default HttpMetaData addSetCookie(HttpSetCookie cookie)
This may result in multiple HttpSetCookies with same name.
cookie - the cookie to add.this.default HttpMetaData addSetCookie(CharSequence name, CharSequence value)
name
and value.
This may result in multiple HttpSetCookies with same name. Added cookie will not be wrapped, not secure,
and not HTTP-only, with no path, domain, expire date and maximum age.
name - the name of the cookie.value - the value of the cookie.this.String toString()
toString in class Objectdefault String toString(BiFunction<? super CharSequence,? super CharSequence,CharSequence> headerFilter)
headerFilter - a function that accepts the header name and value and returns the filtered value