public static class RestClient.RestResponse
Modifiers | Name | Description |
---|---|---|
protected byte[] |
bytes |
|
protected ContentResponse |
response |
Type Params | Return Type | Name and description |
---|---|---|
|
public byte[] |
bytes() Get bytes from a binary response |
|
public RestResponse |
checkError() If status code is not in the 200 range throw an exception with details; call this first for easy error handling or skip it to handle manually or allow errors |
|
public RestClient |
getClient() |
|
public java.lang.String |
getContentType() |
|
public java.lang.String |
getEncoding() |
|
public java.lang.String |
getReasonPhrase() |
|
public int |
getStatusCode() |
|
public java.lang.String |
headerFirst(java.lang.String name) |
|
public java.util.Map<java.lang.String, java.util.ArrayList<java.lang.String>> |
headers() |
|
public java.lang.Object |
jsonObject() Parse the response as JSON and return an Object |
|
public java.lang.String |
text() Get the plain text of the response |
|
public MNode |
xmlNode() Parse the response as XML and return a MNode |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Get bytes from a binary response
If status code is not in the 200 range throw an exception with details; call this first for easy error handling or skip it to handle manually or allow errors
Parse the response as JSON and return an Object
Get the plain text of the response
Parse the response as XML and return a MNode