adding processData option to Request. if set to false, passes the data...#2546
adding processData option to Request. if set to false, passes the data...#2546orthecreedence wants to merge 3 commits intomootools:masterfrom
data...#2546Conversation
…ta` key in the given options, verbatim, to the underlying XHR object. this allows passing of Blob, Uint8Array, etc objects. note that this required a change in Request.initialize that works around setOptions converting the binary data object into an empty Object {}.
|
Haven't validated if this will be useful, but perhaps if you add examples to the docs, and specs to test for the new option it'll be clearer. |
|
I'm also in need of this sort of functionality. Key point is, that it's currently required to replicate the whole Request logic as seen here: A solution to this Problem could either be adding a flag as it was suggested, Having such a functionality would ultimalty allow us writing such code: |
|
Could one of you (@ghost, @WernerWenz or @orthecreedence ) add some working example for this? if possible a jsFiddle with specs example? P.s: Andrew your comment on reddit made find about this PR :) |
|
Sure no Problem: This is based on @orthecreedence's pull request: Removing the new introduced processData will fail the test. For convenience of use, I further suggest automagically inferring things as the action url and the method for example from the FormData, in case a FormData is supplied. You might want to open a new ticket for this Sergio? Edit: The console.log line was obviously not intended in the fiddle. |
... key in the given options, verbatim, to the underlying XHR object. this allows passing of Blob, Uint8Array, etc objects. note that this required a change in Request.initialize that works around setOptions converting the binary data object into an empty Object {}.
Addresses issue #2181