Handle pure JSON post bodies.

Instead of only key=value& POST formats, the gateway server will
attempt to read the entire POST body as a JSON string first, if that
fails then it will attempt to decode key value pairs.