opal-jquery
opal-jquery copied to clipboard
Add setting to prevent payload automatic processing
I was trying to send a multipart payload, but since the current code is processing everything that is not a string as json, I couldn't make through. This PR uses the flag processData for the same purpose that is used in jquery ajax.
In my case, I use it together with contentType: false to send a FormData:
payload = Native(%x{new FormData(#{form.get(0)})})
options = {payload: payload, contentType: false, processData: false}
HTTP.post url, options do |response|
...
end
I agree we should find a way to have the method to be more transparent to jQuery so that we can minimize the necessity to backport every feature from it.
I restarted the build to see if it passes, but I think I need to update the Travis config first.