src/main/java/com/rockagen/commons/http/HttpConn.java
public static String getResponse(HttpResponse response, String encoding) throws IOException {
        log.debug("status: {}", response.getStatusLine().getStatusCode());
        HttpEntity entity = response.getEntity();
        String retval = "";
        if (entity != null) {
            try {
                if (CommUtil.isBlank(encoding)) {
                    encoding = ENCODING;
                }
                retval = IOUtil.toString(entity.getContent(), encoding);

            } finally {
                EntityUtils.consume(entity);

            }
        }
        return retval;
    }
public static String getResponse(HttpResponse response, String encoding) throws IOException {
        log.debug("status: {}", response.getStatusLine().getStatusCode());
        HttpEntity entity = response.getEntity();
        String retval = "";
        if (entity != null) {
            try {
                if (CommUtil.isBlank(encoding)) {
                    encoding = ENCODING;
                }
                retval = IOUtil.toString(entity.getContent(), encoding);

            } finally {
                EntityUtils.consume(entity);

            }
        }
        return retval;
    }
public static String getResponse ( HttpResponse response , String encoding ) throws IOException { log . debug ( "status: {}" , response . getStatusLine ( ) . getStatusCode ( ) ) ; HttpEntity entity = response . getEntity ( ) ; String retval = "" ; if ( entity != null ) { try { if ( CommUtil . isBlank ( encoding ) ) { encoding = ENCODING ; } retval = IOUtil . toString ( entity . getContent ( ) , encoding ) ; } finally { EntityUtils . consume ( entity ) ; } } return retval ; }
Handle response (resolve response to String,httpClient close,etc.)

@param response {@link HttpResponse}
@param encoding the encoding,default is {@link #ENCODING}
@return result String
@throws IOException  if an I/O error occurs
Handle response ( resolve response to String httpClient close etc . )