Created
July 3, 2018 09:04
-
-
Save waghanza/874dfb9daf907e6a19c85939f042cd96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.httpserver | |
import tornado.ioloop | |
import tornado.web | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write('') | |
class UserHandler(tornado.web.RequestHandler): | |
def post(self): | |
self.write('') | |
class UserInfoHandler(tornado.web.RequestHandler): | |
def get(self, id): | |
self.write(id) | |
app = tornado.web.Application([(r'/', MainHandler), | |
(r"/user", UserHandler), | |
(r"/user/(\d+)", UserInfoHandler)]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment