The question : _cp_dispatch not getting called in cherrypy clarifies that _cp_dispatch only gets called when no property/method matches the request.
However, in my code:
import cherrypy
class A(object):
def _cp_dispatch(self, vpath):
raise Exception(str(vpath))
@cherrypy.expose
def index(self):
return "start"
@cherrypy.expose
def method_1(self):
return "method_1"
cherrypy.quickstart(A())
_cp_dispatch is called for http://127.0.0.1:8080/garbage but not for http://127.0.0.1:8080/method_1/garbage or http://127.0.0.1:8080/index/garbage
I need it to be called for these also. I can see that method_1 and index are exposed as endpoints but there isn't any endpoint for method_1/garbage. So why isn't _cp_dispatch being called?