I have a service which works as expected using the codeTest/code button, I'd like to know how to set the body of the request when programatically calling the service. Please see settings below:
I am calling it like this but this doesn't work. P.S. codedataObj/code is just an object and I want to pass it as a JSON string.
code
saveResponseServiceInst.execute({
body: {
"data" : JSON.stringify(dataObj)
},
success: function(response) {
console.log(response);
},
error: function() {
alert("No internet connection or a server error occured.");
}
});
/code