How to fetch JSON argument in Tornado's POST handler?
python, python-2.7, tornado
Solution
use:
data = tornado.escape.json_decode(self.request.body)
Problem
From client I generate post request and in body I have simlpe JSON like ``` { "action": "copy_all", "id": "aabbababab", "factory_id": 12297829382473034000 } ``` How to fetch this argument this in handler (post function) ? I know how to parse when I send like key/value pair and get argument by key, but here JSON is one argument.