Python and bottle - how to get post data of a protocol bufer
bottle, python
Solution
The raw body data is available through `request.body`, a file-like object (either a real file or a BytesIO depending on its size). `request.body.read()` should do the job for you.
Problem
I need to parse a protocol buffer send via a post using bottle. How do I get PB to parse? I tried the following but did nt work: ``` @post('/test') def test(): br = test_pb2.MyRequest() br.ParseFromString(request.files.data) ```