public class RestResponse extends Object
Wraps a ClientResponse
response and provides utility methods to get back the result as a Map
or as a
JsonNode
.
Modifier and Type | Field and Description |
---|---|
protected com.sun.jersey.api.client.ClientResponse |
clientResponse |
protected org.codehaus.jackson.map.ObjectMapper |
objectMapper |
protected org.codehaus.jackson.JsonNode |
responseAsJson |
Constructor and Description |
---|
RestResponse(com.sun.jersey.api.client.ClientResponse clientResponse) |
Modifier and Type | Method and Description |
---|---|
org.codehaus.jackson.JsonNode |
asJson() |
Map<String,Object> |
asMap() |
protected void |
computeResponseAsJson() |
com.sun.jersey.api.client.ClientResponse |
getClientResponse() |
int |
getStatus() |
protected final com.sun.jersey.api.client.ClientResponse clientResponse
protected org.codehaus.jackson.map.ObjectMapper objectMapper
protected org.codehaus.jackson.JsonNode responseAsJson
public RestResponse(com.sun.jersey.api.client.ClientResponse clientResponse)
public com.sun.jersey.api.client.ClientResponse getClientResponse()
public int getStatus()
public org.codehaus.jackson.JsonNode asJson()
protected void computeResponseAsJson()
Copyright © 2016 Nuxeo SA. All rights reserved.