def __init__(self): global url, timeout config = ReadConfig() url = config.get_config_value('apiDomain','domain') timeout = config.get_config_value('apiDomain','timeout') self.data = {} self.headers = {} self.url = None self.files = {}
def __init__(self, name=''): global url, timeout, header header = {} config = ReadConfig() url = config.get_config_value('apiDomain', 'domain') timeout = config.get_config_value('apiDomain', 'timeout') self.headers = config.get_config_section_dict('HEADERS') self.data = {} self.json = {} self.url = None self.files = {} self.cookies = None self.filename = "" self.filepath = ""