title: In Pyramid, can I have multiple views point to the same route/URL based on the request method?
body: <p>I've inherited a project and I'm trying to make it as clean as possible. As it is now, each view just has if/else blocks that handle the different HTTP request methods (GET, POST, DELETE, etc). I would like to have a view method that can handle not only each route, but each route + request method combination.</p>
  
  <p>I'm trying this</p>
  
  <pre><code>@view_config(route_name='foo', request_method='GET', renderer='json')
  def foo(request):
      return Response(json.dumps({'route' : 'foo', 'method' : 'GET'}))
  
  @view_config(route_name='foo', request_method='POST', renderer='json')
  def foo(request):
      return Response(json.dumpds({'route' : 'foo', 'method' : 'POST'}))
  </code></pre>
  
  <p>but it's not working. Can anyone help?</p>