Hey guys,
This is just a question that I've been trying to find some information on and can't seem to locate it anywhere. I want to be able to call a service using code service.execute({});/code, but I want to be able to manipulate some of the callbacks from the javascript code. I found that we can do this:
pre
service.execute({
success: function(e) {
//Success handler here
},
error: function(e) {
//Error handler here
},
complete: function(e) {
//Complete handler here
},
});
/pre
but I've also seen Yurii post this notation:
pre
uploadService2.execute({
'allowDataModification': false,
'processData': false,
'body': {data: data},
'cache': false,
'success': onSuccess
});
/pre
I have 3 questions:
1- Should the success be in quotes, as shown in Yurii's response, or not, as in the previous one?
2- What would we use for the "Before Send" handler?
3- How would we set the data mapping from this javascript?
I've looked at the documentation here, but there is no information on how to create a code snippet that is equivalent to using the Appery's mapping feature (maybe it's just the same as code"body"{data:data}/code?), and no information on setting the "Before Send" handler function.