jQuery Ajax needs to send proper headers

'contentType:"json"' encodes body but sets incorrect 'Content-Type'.
Need to add explicit header and JSON.stringify(data) manually.
Need to therefore identify content type in the test data.
Merge pull request #43 from mattdenner/handle_encoding_json_issues

jQuery Ajax needs to send proper headers