public Response handleResponse ( CloseableHttpResponse httpResponse ) throws IOException { Response serverResponse = createCharsetResponse ( httpResponse ) ; Header [ ] allHeaders = httpResponse . getAllHeaders ( ) ; Response . ResponseBuilder responseBuilder = Response . fromResponse ( serverResponse ) ; for ( Header thisHeader : allHeaders ) { String headerKey = thisHeader . getName ( ) ; responseBuilder = responseBuilder . header ( headerKey , thisHeader . getValue ( ) ) ; handleHttpSession ( serverResponse , headerKey ) ; } return responseBuilder . build ( ) ; }
Once the client executes the http call then it receives the http response . This method takes care of handling that . In case you need to handle it differently you can override this method .