diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.service-invoker-utility/public/js/invoker-lib.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.service-invoker-utility/public/js/invoker-lib.js index c94345469f..1a7c52198b 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.service-invoker-utility/public/js/invoker-lib.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.lib.service-invoker-utility/public/js/invoker-lib.js @@ -55,6 +55,9 @@ var invokerUtil = function () { paramValue.actionMethod = methoad; paramValue.actionUrl = url; paramValue.actionPayload = payload; + if(acceptType == "application/json"){ + paramValue.actionPayload = JSON.stringify(payload); + } data.data = JSON.stringify(paramValue); $.ajax(data).fail(function (jqXHR) { if (jqXHR.status == "401") {