Skip to content

Instantly share code, notes, and snippets.

@badmetacoder
Last active December 18, 2015 16:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save badmetacoder/5814134 to your computer and use it in GitHub Desktop.
Save badmetacoder/5814134 to your computer and use it in GitHub Desktop.
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
print self.request.headers
print
self.finish()
application = tornado.web.Application([
(r"/", MainHandler),
(r"/test", MainHandler)
])
if __name__ == "__main__":
application.listen(8888)
tornado.ioloop.IOLoop.instance().start()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment