@ Override protected String parseResponse ( final HttpResponse response ) throws HttpResponseException , IOException { final StatusLine statusLine = response . getStatusLine ( ) ; final String responseBody = response . getEntity ( ) != null ? EntityUtils . toString ( response . getEntity ( ) ) : "" ; if ( statusLine . getStatusCode ( ) >= 300 ) { logger . error ( String . format ( "unable to parse response as the response status is %s" , statusLine . getStatusCode ( ) ) ) ; throw new HttpResponseException ( statusLine . getStatusCode ( ) , responseBody ) ; } return responseBody ; }
Implementing the parseResponse function to return de - serialized Json object .