Correctly POST JSON data

Stringify the parameters and set the content-type header.