protected void handleHeaderLinks ( HttpResponse response , Map < String , Map < URI , String > > links , Map < String , String > linkTemplates ) { getLinkHeaders ( response ) . forEach ( header -> { if ( header . getRel ( ) == null ) { return ; } if ( header . isTemplated ( ) ) { linkTemplates . put ( header . getRel ( ) , header . getHref ( ) ) ; } else { getOrAdd ( links , header . getRel ( ) ) . put ( uri . resolve ( header . getHref ( ) ) , header . getTitle ( ) ) ; } } ) ; }
Handles links embedded in HTTP response headers .