

def set_header(self, header_key, header_value):
    'Set the value of the defined header key.\n\n        Args:\n            key (str): The name of the header key to set.\n            value (str): The value associated to the header key to set.\n\n        Returns:\n            profile (object): The object to pass as argument to the webdriver.\n        '
    if (self.driver_name == 'Firefox'):
        header_key = header_key.lower().replace('-', '')
        self.profile.set_preference(('general.%s.override' % header_key), header_value)
    elif (self.driver_name == 'PhantomJS'):
        self.profile[('phantomjs.page.customHeaders.%s' % header_key)] = header_value
    else:
        raise HeaderException('Webdriver not supported for now.')
    return self.profile

dataset/ETHPy150Open thylong/cabu/cabu/utils/headers.py Headers.set_header/original