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 protectedJsonResponse(RawResponse response)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonNodegetBody()private JsonNodegetNode(RawResponse response)protected java.lang.StringgetRawBody()private JsonNodetoJsonNode(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:
getBodyin interfaceHttpResponse<JsonNode>- Specified by:
getBodyin classBaseResponse<JsonNode>- Returns:
- the body
-
getRawBody
protected java.lang.String getRawBody()
- Specified by:
getRawBodyin classBaseResponse<JsonNode>
-
-