public class RestTestResponse
extends java.lang.Object
| Constructor and Description |
|---|
RestTestResponse(org.elasticsearch.client.Response response) |
RestTestResponse(org.elasticsearch.client.ResponseException responseException) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
evaluate(java.lang.String path)
Parses the response body as json and extracts a specific value from it (identified by the provided path)
|
java.lang.Object |
evaluate(java.lang.String path,
Stash stash)
Parses the response body as json and extracts a specific value from it (identified by the provided path)
|
java.lang.Object |
getBody()
Returns the body properly parsed depending on the content type.
|
java.lang.String |
getBodyAsString()
Returns the body as a string
|
java.lang.String |
getReasonPhrase() |
int |
getStatusCode() |
boolean |
isError() |
public RestTestResponse(org.elasticsearch.client.Response response)
public RestTestResponse(org.elasticsearch.client.ResponseException responseException)
public int getStatusCode()
public java.lang.String getReasonPhrase()
public java.lang.Object getBody()
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getBodyAsString()
public boolean isError()
public java.lang.Object evaluate(java.lang.String path)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.Object evaluate(java.lang.String path,
Stash stash)
throws java.io.IOException
java.io.IOException