def __init__(self): """Use response.text have performance problem, use response.html fix it. This is an issue, maybe some init charset not set, requests use chardet library to detect charset of the html content. """ ResponseLib.__init__(self)
def __init__(self, result, status_code=200): Response.__init__(self) self.result = result self.status_code = status_code
def __init__(self, json_data, status_code): Response.__init__(self) self.json_data = json_data self.status_code = status_code
def __init__(self, result, status_code=200, **kwargs): Response.__init__(self) self.result = result self.status_code = status_code self.raw = kwargs.get("raw")
def __init__(self, json_data): Response.__init__(self) self.json_data = json_data self.status_code = json_data["status_code"] self.reason = json_data["reason"] self.url = json_data["url"]