}
writer.println( "\r\n---------------- Request ---------------------------" );
if( response != null )
{
StringToStringsMap headers = response.getRequestHeaders();
for( String key : headers.keySet() )
{
if( headers.get( key ) != null )
writer.println( key + ": " + headers.get( key ) );
}
}
if( StringUtils.hasContent( requestContent ) )
writer.println( "\r\n" + requestContent );
else
writer.println( "\r\n- missing request / garbage collected -" );
writer.println( "\r\n---------------- Response --------------------------" );
if( response != null )
{
StringToStringsMap headers = response.getResponseHeaders();
for( String key : headers.keySet() )
{
if( headers.get( key ) != null )
writer.println( key + ": " + headers.get( key ) );
}
String respContent = response.getContentAsString();
if( respContent != null )
writer.println( "\r\n" + respContent );