private static String trySlurpContent ( HttpResponse response ) { try { return IOUtils . toString ( response . getEntity ( ) . getContent ( ) ) ; } catch ( IOException e ) { return "" ; } }
Tries to read all the content from the HTTP response into a string . If an IO failure occurs while reading content empty string is returned instead .