code: def redirect(self, url, status=None):
          
          self.status_code = 302 if status is None else status
          self.headers = Headers([('location', url)])
          self.message = ''
          self.end()
docs: Redirect to the specified url, optional status code defaults to 302.