'use strict' ; export class InteractsWithHeaders { /**
     * The wrapped request instance.
     */ private readonly _headers : Map < string , string > ; param { Object } headers constructor ( headers ) { this . _headers = this . asMap ( headers || { } ) ; } param { Object } requestHeaders returns { Object } private asMap ( requestHeaders ) { const headers = new Map ( ) ; Object . keys ( requestHeaders ) . forEach ( name => { const value = requestHeaders [ name ] ; headers . set ( this . lower ( name ) , value ? this . lower ( value ) : value ) ; } ) ; return headers ; } param { String } str returns { String } lower ( str ) { return String ( str ) . toLowerCase ( ) ; } returns { Map } headers ( ) { return this . _headers ; } returns { Boolean } hasHeaders ( ) { return this . headers ( ) . size > 0 ; } param { String } name returns { String } header ( name ) { return this . headers ( ) . get ( name ) ; } }