def _from_reply(self, reply: QtNetwork.QNetworkReply): """Updates the Response object with the remaining data from the reply.""" # Read the reply's body if reply.isReadable(): self.raw_content.seek(0) self.raw_content.write(reply.readAll()) # Store the cookies manager: QtNetwork.QNetworkAccessManager = reply.manager() jar: QtNetwork.QNetworkCookieJar = manager.cookieJar() object.__setattr__(self, 'cookies', {c.name().data().decode(): c.value() for c in jar.allCookies()})