The exec() method on iOS allows only a single js object to appear in the
arguments, and it passes it onto the native side as the "options" object.
Code snippet:
for (var i = 0; i < actionArgs.length; ++i) {
var arg = actionArgs[i];
if (arg === undefined || arg === null) { // nulls are pushed to the
args now (becomes NSNull)
command["arguments"].push(arg);
} else if (typeof(arg) == 'object' && !(utils.isArray(arg))) {
command.options = arg;
} else {
command["arguments"].push(arg);
}
}
For reworking how headers are sent in FileTransfer, I tried to pass the
headers map as well as the upload params, and so got into trouble when the
headers map clobbered the params map in the code snippet above.
So, I'm wondering what the reason is for doing this?