Currently the JsonResponse class is constructed twice in the Client.java file, once by marshaling it with Gson, and the creating a new JsonResponse with the message, id and the response.statusCode() method.
This will be refactored to use another class, ApiResponse, and using a toJsonResponse() method to convert the HttpResponse inside it to the JsonResponse class
Description
Currently the JsonResponse class is constructed twice in the Client.java file, once by marshaling it with Gson, and the creating a new JsonResponse with the message, id and the
response.statusCode()
method.This will be refactored to use another class,
ApiResponse
, and using atoJsonResponse()
method to convert theHttpResponse
inside it to theJsonResponse
class