No reason, just legacy code. For file transfer I recommend that the headers value is just a url encoded string, as that is how it is transfered anyway.
On Thu, Jul 12, 2012 at 1:16 PM, Andrew Grieve <[email protected]> wrote: > 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? > -- @purplecabbage risingj.com
