adding JSON strigify on payload if contentType is json

revert-70aa11f8
Rasika Perera 9 years ago
parent 6ec5b7a85a
commit 69e38b3c98

@ -55,6 +55,9 @@ var invokerUtil = function () {
paramValue.actionMethod = methoad; paramValue.actionMethod = methoad;
paramValue.actionUrl = url; paramValue.actionUrl = url;
paramValue.actionPayload = payload; paramValue.actionPayload = payload;
if(acceptType == "application/json"){
paramValue.actionPayload = JSON.stringify(payload);
}
data.data = JSON.stringify(paramValue); data.data = JSON.stringify(paramValue);
$.ajax(data).fail(function (jqXHR) { $.ajax(data).fail(function (jqXHR) {
if (jqXHR.status == "401") { if (jqXHR.status == "401") {

Loading…
Cancel
Save