Пример #1
0
    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)
Пример #2
0
    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)
Пример #3
0
 def __init__(self, result, status_code=200):
     Response.__init__(self)
     self.result = result
     self.status_code = status_code
Пример #4
0
 def __init__(self, json_data, status_code):
     Response.__init__(self)
     self.json_data = json_data
     self.status_code = status_code
Пример #5
0
 def __init__(self, result, status_code=200, **kwargs):
     Response.__init__(self)
     self.result = result
     self.status_code = status_code
     self.raw = kwargs.get("raw")
Пример #6
0
 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"]