Tornado. How get raw request.body?
Question: guys. I can't get raw body data with Tornado. I do request `curl -i
localhost:8888 -d '{"a":12}'` and expect to get a string `'{"a":12}'` in
request.body, but received `'{a:12}'`. Source code:

    
    
    import tornado.web
    import tornado.ioloop
    
    class MainHandler(tornado.web.RequestHandler):
        def post(self):
            self.write(self.request.body)
    
    if __name__ == "__main__":
        app = tornado.web.Application({
            (r"/", MainHandler)
        })
        app.listen(3000)
        tornado.ioloop.IOLoop.instance().start()
    

curl result:

    
    
    $ curl 127.0.0.1:3000 -i -d {"a":12}
    HTTP/1.1 200 OK
    Content-Type: text/html; charset=UTF-8
    Server: TornadoServer/4.0.2
    Content-Length: 6
    Date: Thu, 22 Jan 2015 14:00:19 GMT
    
    {a:12}
    

Python version is 3.4.2, Tornado version is 4.0.2


Answer: This is a shell quoting issue: the shell is removing the quotes in the command
`curl 127.0.0.1:3000 -i -d {"a":12}`. If you quote the argument to `-d` (which
you did in the body of your question: `curl -i localhost:8888 -d '{"a":12}'`,
you should get the results you expect.

