'Add parameters that are necessary for every request
If user and password are specified, include a base http auth
header'

def add_default_headers(self, headers):

    headers['Content-Type'] = 'application/json'
    if (self.user_id and self.key):
        user_b64 = base64.b64encode(b(('%s:%s' % (self.user_id, self.key))))
        headers['Authorization'] = ('Basic    %s' % user_b64.decode('utf-8'))
    return headers
