public abstract class RestResponse extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,List<String>> |
customHeaders |
Constructor and Description |
---|
RestResponse() |
Modifier and Type | Method and Description |
---|---|
void |
addHeader(String name,
String value)
Add a custom header.
|
abstract BytesReference |
content()
The response content.
|
abstract String |
contentType()
The response content type.
|
void |
copyHeaders(ElasticsearchException ex) |
Map<String,List<String>> |
getHeaders()
Returns custom headers that have been added, or null if none have been set.
|
abstract RestStatus |
status()
The rest status code.
|
public abstract 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)
Copyright © 2009–2017. All rights reserved.