#NEWLINE# def add_default_headers( self , headers ) : #NEWLINE# #INDENT# '\n        Add Basic Authentication header to all the requests.\n        It injects the "Authorization: Basic Base64String===" header\n        in each request\n\n        :type  headers: ``dict``\n        :param headers: Default input headers\n\n        :rtype:         ``dict``\n        :return:        Default input headers with the "Authorization" header.\n        ' #NEWLINE# b64string = b ( ( '%s:%s' % ( self . user_id , self . key ) ) ) #NEWLINE# encoded = b64encode ( b64string ) . decode ( 'utf-8' ) #NEWLINE# headers [ 'Authorization' ] = ( 'Basic ' + encoded ) #NEWLINE# return b64string