Tornado uses classes which derive from tornado.web.RequestHandler
to define post
and get
methods. I have created a request handler for the path r/action/*
Since there are different more concrete paths, like action/doThis
and action/requestThat
I have structured the get
method with a if-then-else structure checking for the concrete request URI.
That seems very clumsy, is there a more sophisticated way to structure that, for instance with methods? Or would the Tornado way be to just define more RequestHandlers? I like the way bottle does it with Function Decorators, but since they are Python 3, this is not an option at the moment.