I am having trouble passing data to a Mingle web service that I am trying to access via a script for MWS410. I've looked around and compared my code to others trying to consume a Post web service but I haven't been able to find a solution that works. My question is what is the correct way to send data to a web service using H5 SDK tool?
var request = {
url:reqUrl,
dataType : 'json',
method:'POST',
contentType: 'application/json',
data: JSON.stringify({"MessageText" : "this Message"})
};
IonApiService.Current.execute(request).then(function(response) {
if (!response.data.ErrorList) {
console.log("---------------SUCCESS------------------");
console.log(response);
}
else {
for (var _i = 0, _a = response.data.ErrorList; _i < _a.length; _i++) {
var error = _a[_i];
console.log("ERROR");
console.log(error.Message);
}
}
})