Cao Minh Vu
Cao Minh Vu

Reputation: 1950

Tornado supports absolute URI

I have one server using Tornado, it works with relative URI: Ex: http://localhost:8085:getIpAddr but it doesn't work with absolute uri Ex: http://localhost:8085http://localhost:8085/getIpAddr

So, is there any setting in tornado to trigger this function? or any workaround ?

Upvotes: 0

Views: 101

Answers (1)

Reza-S4
Reza-S4

Reputation: 1052

Try this style for your all url patterns:

(r'/', main.IndexHandler, None, 'index'),
(r'^/getIpAddr[/]?$', main.GetIpAddrHandler),
(r'^/getIpAddr$', main.GetIpAddrHandler, None, 'getIpAddr'),
...

Upvotes: 3

Related Questions