@ SuppressWarnings ( "PMD.AvoidInstantiatingObjectsInLoops" ) private static Iterable < String > extend ( final Response res , final Iterable < ? extends CharSequence > headers ) throws IOException { Response resp = res ; for ( final CharSequence hdr : headers ) { resp = new RsWithHeader ( resp , hdr ) ; } return resp . head ( ) ; }
Add to head additional headers .