title: webapp2 redirect explained
body: <p>I'm sometimes unsure how to use <a href="http://webapp-improved.appspot.com/api/webapp2.html?highlight=redirect#webapp2.redirect">webapp2.redirect</a>.</p>
  
  <p>Is there ever a time when I should use
  <code>self.redirect("/blah")</code> instead of <code>return self.redirect("/blah")</code></p>
  
  <p>Here is my understanding/guess of the time-line: (sometimes i'm confused about if the response object does something or if webapp2 does it)</p>
  
  <ol>
  <li>I visit my multithreaded website www.mysite.com/name/robert, chrome sends a GET
  request (lets assume this request is a text file)</li>
  <li>webapp2 grabs this "text file" and turns it into a webapp2.Request.
  webapp2 also makes a new webapp2.Response.</li>
  <li>somehow the request url is given to the router for matching (either
  by webapp2 or by the response). An appropriate RequestHandler is
  instantiated. The RequestHandler's get() method is called with
  appropriate arguments.</li>
  <li>throughout this time there has only been one request and one
  response.</li>
  <li>the get() method calls response.out.write("hello world") adding
  "hello world" to the response body?</li>
  <li>the get() method calls self.redirect('/foo')</li>
  <li><strong>Stuff happens</strong></li>
  <li>the get() method calls self.out.write("bye world")</li>
  <li>the response is sent to the client containing hello world, what food added, bye world</li>
  </ol>
  
  <p>example of the initial get function:</p>
  
  <pre><code>def get():
      self.write('hello world')
      self.redirect('/foo')
      self.write('bye world')
  </code></pre>
  
  <p>What "<strong>stuff happens</strong>"? I suppose the router finds /foo/'s RequestHandler. <strong>What modifications are made to the Request and Response before foo's requestHandlers get() method is called</strong>. Is the request deleted and replaced by a new GET request? Is the response deleted and replaced by a new one? What context remains that was present in the initial request handler? does code execution return to the initial request handlers get method and if so is the context that may have existed restored?</p>
  
  <p>Sorry If this is a bit of a mouthful, I've tried explaining what I want to know :)</p>
  
  <p>Perhaps it would have been easier to ask for some use cases (do's and don'ts) of using redirect instead.</p>