Posts

Showing posts with the label tornado

Tornado endpoint matching

Tornado endpoint matching I have been trying to find some documentation from tornado about endpoint matching priorities and I couldnt find anything..I wonder what is the expected behaviour of tornado doing endpoint matching. Example: def make_app(): return tornado.web.Application( (r"/api/v1/tree/", test1), ( r"/api/v1/?(?P<variable1>[A-Za-z0-9-]+)?/?(?P<variable2>[A-Za-z0-9-]+)?", test2, ), (r"/api/v1/garden/tree/" + r"([^/]+)/", test3) ] ) In particular I wonder if the 1st and 3rd method will be ever called or if the second call will make the others to be ignored. Whichever match is found first, tornado will call that handler. – xyres Jun 28 at 17:36 ...