|Constructor and Description|
Response entity; null if none.
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bodyBytes, bodyString, header, httpVersion, statusCode
cancel, isCompleted, onCompletion, pollResult, timeout
public HttpStatus status()
The returned Map is case insensitive for lookup. The caller should treat the Map as read-only.
The following headers should not be included in this Map:
"Content-Type"). Entity metadata should be expressed on the
"Transport-Encoding"headers. They are handled automatically by underlying libraries.
"Set-Cookie"headers. Cookies are represented in
Note that each header contains a single value. Per spec, multiple headers with the same name is identical in semantics to a single combined header:
Foo: value1 | Foo: value2 | ====> | Foo: value1, value2, value3 Foo: value3 |
The returned list should be treated as read-only by the caller.
Although response cookies are expressed in
"Set-Cookie" headers on the wire,
they cannot be treated as normal headers (due to a historical oversight).
HttpResponse.headers() cannot contain
and, response cookies must be expressed in
public HttpEntity entity()
A response must have an entity, except in the following cases, where entity() should return null:
entity() should return null, but returns non-null, the entity should be ignored.
If the request method is HEAD,
response.entity() should behave as if the request method is GET,
with the exception of the body - the recipient of the response must not read the entity body.