Created
April 6, 2016 12:23
-
-
Save jpallari/81af3c25b91387b75791cfb32a0649e8 to your computer and use it in GitHub Desktop.
Dump incoming POST requests to STDOUT
This file contains hidden or 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
#!/usr/bin/env python | |
import tornado.ioloop | |
import tornado.web | |
import pprint | |
class MyDumpHandler(tornado.web.RequestHandler): | |
def post(self): | |
pprint.pprint(self.request) | |
pprint.pprint(self.request.body) | |
if __name__ == "__main__": | |
tornado.web.Application([(r"/.*", MyDumpHandler),]).listen(9000) | |
tornado.ioloop.IOLoop.instance().start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment