Accept application/json requests.

This parses the POST body according to its Content-Type.  The ApiInterface gets an extra argument to receive incoming JSON.