public static String getResult ( HttpResponse response ) throws IOException { StringBuffer result = new StringBuffer ( ) ; if ( response . getEntity ( ) != null && response . getEntity ( ) . getContent ( ) != null ) { BufferedReader rd = new BufferedReader ( new InputStreamReader ( response . getEntity ( ) . getContent ( ) ) ) ; String line = "" ; while ( ( line = rd . readLine ( ) ) != null ) { result . append ( line ) ; } } logger . info ( result . toString ( ) ) ; return result . toString ( ) ; }
Parse the response and return the string from httpresponse body