In my post handler, the body of the message is a json.
In self.request.body, I’m getting a HTML encoded message:
%7B+%22name%22%3A+%22John+Dao%22%2C+%22Age%22%3A+42+%7D=
Taking a look at the network traffic, the payload is actually:
{ "name": "John Dao", "Age": 42 }
So, I’m pretty sure the encoding happens on the server. How do I decode this string, or somehow tell json.loads to accept encoded message, or better yet – tell WSGI (It is Google App Engine) not encoding the body to beging with?
It looks as though the GAE implementation of WebOb is trying to parse and rewrite the POST body as though its content type is “application/x-www-urlencoded” – even the url-decoded string has a “=” appended to it.
If this is the case, and you can change the client behavior, try setting it to something like “application/json” instead.