Subversion Repositories SmartDukaan

Rev

Rev 14007 | Rev 14011 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 14007 Rev 14010
Line 44... Line 44...
44
class Track():
44
class Track():
45
    def on_post(self, req, resp, userId):
45
    def on_post(self, req, resp, userId):
46
        try:
46
        try:
47
            string1 = req.stream.read()
47
            string1 = req.stream.read()
48
            req_json = json.loads(string1, encoding='utf-8')
48
            req_json = json.loads(string1, encoding='utf-8')
-
 
49
            print req_json
49
        except ValueError:
50
        except ValueError:
50
            raise falcon.HTTPError(falcon.HTTP_400,
51
            raise falcon.HTTPError(falcon.HTTP_400,
51
                'Malformed JSON',
52
                'Malformed JSON',
52
                'Could not decode the request body. The '
53
                'Could not decode the request body. The '
53
                'JSON was incorrect.')
54
                'JSON was incorrect.')