export class ResponseHeader { public static getLinksFromLinkHeader ( linksHeader ) { const links = { } ; if ( linksHeader ) { linksHeader . forEach ( part => { const section = part . split ( ';' ) ; const url = section [ 0 ] . replace ( /<(.*)>/ , '$1' ) . trim ( ) ; const name = section [ 1 ] . replace ( /rel="(.*)"/ , '$1' ) . trim ( ) ; links [ name ] = url ; } ) ; } return links ; } }