public abstract class RestResponse
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
customHeaders |
Constructor and Description |
---|
RestResponse() |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(java.lang.String name,
java.lang.String value)
Add a custom header.
|
abstract BytesReference |
content()
The response content.
|
abstract java.lang.String |
contentType()
The response content type.
|
void |
copyHeaders(ElasticsearchException ex) |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getHeaders()
Returns custom headers that have been added, or null if none have been set.
|
abstract RestStatus |
status()
The rest status code.
|
protected java.util.Map<java.lang.String,java.util.List<java.lang.String>> customHeaders
public abstract java.lang.String contentType()
public abstract BytesReference content()
Releasable
it
should automatically be released when done by the channel sending it.public abstract RestStatus status()
public void copyHeaders(ElasticsearchException ex)
public void addHeader(java.lang.String name, java.lang.String value)
@Nullable public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getHeaders()