I have a standard javascript ajax call where I\'m setting the data: to json data.
$.ajax({
type: \"POST\",
url: BaseUrl + \"User/Login\",
//url:
data
option must be an object
or serialized(e.g. "name1=value1&name2=value2"
) string.So you need to pass like this:
data: /*object*/{data:'{"apiKey":"c7089786-7e3a-462c-a620-d85031f0c826","appIDGiven":"200","userName":"matt2","password":"pass"}'},
// ^-----this is added for $_POST["data"]
or like:
data: /*serialized string*/'data={"apiKey":"c7089786-7e3a-462c-a620-d85031f0c826","appIDGiven":"200","userName":"matt2","password":"pass"}',
// ^-----this is added for $_POST["data"]