@Header(value="TE") public class TE extends BasicStringRangeArrayHeader
The transfer encodings the user agent is willing to accept: the same values as for the response header field Transfer-Encoding can be used, plus the "trailers" value (related to the "chunked" transfer method) to notify the server it expects to receive additional fields in the trailer after the last, zero-sized, chunk.
TE: trailers, deflate
TE = "TE" ":" #( t-codings ) t-codings = "trailers" | ( transfer-extension [ accept-params ] )
The presence of the keyword "trailers" indicates that the client is willing to accept trailer fields in a chunked transfer-coding, as defined in section 3.6.1. This keyword is reserved for use with transfer-coding values even though it does not itself represent a transfer-coding.
Examples of its use are:
TE: deflate TE: TE: trailers, deflate;q=0.5
The TE header field only applies to the immediate connection. Therefore, the keyword MUST be supplied within a Connection header field (section 14.10) whenever TE is present in an HTTP/1.1 message.
A server tests whether a transfer-coding is acceptable, according to a TE field, using these rules:
If the TE field-value is empty or if no TE field is present, the only transfer-coding is "chunked". A message with no transfer-coding is always acceptable.
Constructor and Description |
---|
TE(Object value)
Constructor
|
TE(String value)
Constructor
|
Modifier and Type | Method and Description |
---|---|
static TE |
of(Object value)
Convenience creator.
|
static TE |
of(String value)
Returns a parsed and cached header.
|
static TE |
of(Supplier<?> value)
Convenience creator using supplier.
|
asRanges, getRange, getRanges, getValue, match, of, of
assertName, assertValue, canCast, cast, eqIC, equals, getElements, getName, getRawValue, hashCode, isSupplier, of, ofPair, toString, unwrap
public TE(Object value)
value
- The header value.
String
- Converted using StringRanges.of(String)
.
Supplier
of anything on this list.
public static TE of(String value)
value
- The header value.TE
object.public static TE of(Object value)
value
- The header value.
String
- Converted using StringRanges.of(String)
.
TE
object.public static TE of(Supplier<?> value)
Header value is re-evaluated on each call to BasicStringRangeArrayHeader.getValue()
.
value
- The header value supplier.
String
- Converted using StringRanges.of(String)
.
TE
object.Copyright © 2016–2020 The Apache Software Foundation. All rights reserved.