public abstract class HttpResponse extends java.lang.Object implements HttpMessage, HttpMessage.MessageTransformations<HttpResponse>
HttpMessage.DiscardedEntity, HttpMessage.MessageTransformations<Self>
Constructor and Description |
---|
HttpResponse() |
Modifier and Type | Method and Description |
---|---|
static HttpResponse |
create()
Returns a default response to be changed using the `withX` methods.
|
abstract HttpEncoding |
encoding()
Returns the content encoding as specified by the Content-Encoding header.
|
abstract ResponseEntity |
entity()
Returns the entity of this response.
|
abstract StatusCode |
status()
Returns the status-code of this response.
|
abstract HttpResponse |
withEntity(ResponseEntity entity)
Returns a copy of this instance with a new entity.
|
abstract HttpResponse |
withStatus(int statusCode)
Returns a copy of this instance with a new status-code.
|
abstract HttpResponse |
withStatus(StatusCode statusCode)
Returns a copy of this instance with a new status-code.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
discardEntityBytes, discardEntityBytes, getAttribute, getHeader, getHeader, getHeaders, getHeaders, isRequest, isResponse, protocol
addAttribute, addCredentials, addHeader, addHeaders, removeAttribute, removeHeader, toStrict, toStrict, toStrict, toStrict, transformEntityDataBytes, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withHeaders, withProtocol
public abstract StatusCode status()
public abstract ResponseEntity entity()
entity
in interface HttpMessage
public abstract HttpResponse withStatus(StatusCode statusCode)
public abstract HttpResponse withStatus(int statusCode)
public abstract HttpResponse withEntity(ResponseEntity entity)
public abstract HttpEncoding encoding()
public static HttpResponse create()