def __iter__(self):
req = self.prepare(self.request)<EOL>resp = yield req<EOL>while resp.status_code in (<NUM_LIT>, <NUM_LIT>, <NUM_LIT>):<EOL><INDENT>resp = yield req.replace(url=resp.headers['<STR_LIT>'])<EOL><DEDENT>return self.load(self.check_response(resp))<EOL>
perform the query, while handling redirects