aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http_semantics.py
blob: e8313e3cecd7a471618117fe195147ef2ba59e1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Response(object):

    def __init__(
        self,
        httpversion,
        status_code,
        msg,
        headers,
        content,
        sslinfo=None,
    ):
        self.httpversion = httpversion
        self.status_code = status_code
        self.msg = msg
        self.headers = headers
        self.content = content
        self.sslinfo = sslinfo

    def __eq__(self, other):
        return self.__dict__ == other.__dict__

    def __repr__(self):
        return "Response(%s - %s)" % (self.status_code, self.msg)