private void writeResponseHeaderToRecordHeader ( Response response , Record . Header header ) { for ( Map . Entry < String , List < String > > entry : response . getStringHeaders ( ) . entrySet ( ) ) { if ( ! entry . getValue ( ) . isEmpty ( ) ) { String firstValue = entry . getValue ( ) . get ( 0 ) ; header . setAttribute ( conf . headerAttributePrefix + entry . getKey ( ) , firstValue ) ; } } }
Writes HTTP response headers to the SDC Record header with the configured optional prefix .