title: Friendly URL for a REST WebService with CherryPy
body: <p>I'm making a RESTful WebService using CherryPy 3 but I encounter a problem :
  I want to be able to answer requests like :
  <strong>/customers/1/products/386</strong> meaning I want all the product with ID 386 of the client with ID 1.</p>
  
  <p>So I try to make it with the CherryPy's MethodDispatcher like this :  </p>
  
  <pre><code>class UserController(object):
      exposed = True
  
      def __init__(self):
          self.product = ProductController()
  
      @log_io
      def GET(self, *args):
          return "GET Users :" + str(args)
  
  
  class ProductController(object):
      exposed = True
      @log_io
      def GET(self, *args):
          return "GET Product :" + str(args)
  </code></pre>
  
  <p>But when I request /customers/1/products/386, instead of redirecting me to ProductController.GET with the right parameters, it redirects me to UserController.GET with the parameters 1, "products", 386.</p>
  
  <p>To be redirected to ProductController.GET I have to query /customers/products/386 which is incorrect because I miss the user ID parameter.</p>
  
  <p>I've seen on this presentation : <a href="https://docs.google.com/presentation/d/1pVtqh99VfmOycus9OoY19jemSYPsXbdia-v2szT7Vs0/">RESTful Web Applications with CherryPy</a> that the path style I want to use seems to be a good choice. But is there an easy way to implement it with Cherry Py ? </p>
  
  <p>I've heard about the _cp_dispatch method of CherryPy 3 but I don't get exactly what it is and how to use it. Does it replace the MethodDispatcher ?</p>