def __call__(self, r):
        r.register_hook('response', self.response_hook)
            
        data = json.loads(r.body)
        if 'sid' not in data:
            if self.sid is None:
                self.sid = self._get_sid(r.url)
            data.update({'sid': self.sid})
            req = requests.Request('POST', r.url, auth=self.http_auth)
            req.data = json.dumps(data)
            return req.prepare()
        else:
            self.sid = data['sid']
        return r
dataset/ETHPy150Open Vassius/ttrss-python/ttrss/auth.py/TTRAuth.__call__/original