title: Python Tornado get URL arguments
body: <p>I'm trying to inspect a request's argument before the <code>get()</code> is invoked. I have a route which is described as so:</p>
  
  <pre><code>user_route = r"/users/key=(?P&lt;key&gt;\w+)"
  app = web.Application([
          web.URLSpec(user_route, user_manager.UserHandler), ..])
  </code></pre>
  
  <p>Next, (in the handler) <code>prepare()</code> is used to inspect the request before <code>get()</code>.</p>
  
  <pre><code>def prepare(self):
      # inspect request arguments
      print(self.request.arguments) # prints "{}"
  </code></pre>
  
  <p>The problem I'm having is that I cannot access the arguments from <code>prepare()</code>. The last statement prints an empty dict. My <code>get()</code> successfully uses the arguments as they are passed in the function like this:</p>
  
  <pre><code>def get(self, key):
        print(key) #works
  </code></pre>
  
  <p>How do I access arguments in <code>prepare()</code>? I have also tried <code>self.argument('key')</code> which gives an error "400 GET .... Missing argument key", but requested URL does have a key argument in it.</p>