protected void handleResponse ( int responseCode , InputStream inputStream ) { BufferedReader rd = null ; try { // Buffer the result into a string rd = new BufferedReader ( new InputStreamReader ( inputStream ) ) ; StringBuilder sb = new StringBuilder ( ) ; String line ; while ( ( line = rd . readLine ( ) ) != null ) { sb . append ( line ) ; } log . info ( "HttpHook [" + hookName + "] received " + responseCode + " response: " + sb ) ; } catch ( IOException e ) { log . error ( "Error while reading response for HttpHook [" + hookName + "]" , e ) ; } finally { if ( rd != null ) { try { rd . close ( ) ; } catch ( IOException e ) { // no-op } } } }
Can be overridden if you want to replace or supplement the debug handling for responses .