Package kong.unirest.core
Class JsonResponse
- java.lang.Object
-
- kong.unirest.core.BaseResponse<JsonNode>
-
- kong.unirest.core.JsonResponse
-
- All Implemented Interfaces:
HttpResponse<JsonNode>
public class JsonResponse extends BaseResponse<JsonNode>
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JsonResponse(RawResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonNode
getBody()
private JsonNode
getNode(RawResponse response)
protected java.lang.String
getRawBody()
private JsonNode
toJsonNode(java.lang.String json)
-
Methods inherited from class kong.unirest.core.BaseResponse
getCookies, getHeaders, getParsingError, getRequestSummary, getStatus, getStatusText, ifFailure, ifFailure, ifSuccess, isSuccess, map, mapBody, mapError, setParsingException
-
-
-
-
Field Detail
-
node
private JsonNode node
-
-
Constructor Detail
-
JsonResponse
protected JsonResponse(RawResponse response)
-
-
Method Detail
-
getNode
private JsonNode getNode(RawResponse response)
-
toJsonNode
private JsonNode toJsonNode(java.lang.String json)
-
getBody
public JsonNode getBody()
- Specified by:
getBody
in interfaceHttpResponse<JsonNode>
- Specified by:
getBody
in classBaseResponse<JsonNode>
- Returns:
- the body
-
getRawBody
protected java.lang.String getRawBody()
- Specified by:
getRawBody
in classBaseResponse<JsonNode>
-
-