posting JSON via AJAX results in garbled request payload

posting JSON via AJAX results in garbled request payload

chrismv48chrismv48 Posts: 5Questions: 3Answers: 0
edited August 2014 in Free community support

I'm attempting to post JSON data to the server and use the JSON in the response to ultimately populate the datatable. However I've experiencing some strange behavior.

Using this code:

table_config.ajax = {
                "type": "POST",
                "url": $(location).attr('pathname'),
                "data": JSON.stringify({'member_id':2444}),
                "dataType": "json",
                "contentType": "application/json",
                "dataSrc": "results.data"
            };

I get a 400 HTTP response and the request payload looks like:

0=%7B&1=%22&2=m&3=e&4=m&5=b&6=e&7=r&8=_&9=i&10=d&11=%22&12=%3A&13=2&14=4&15=4&16=4&17=%7D

What's going on here?

This discussion has been closed.