Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add setting to prevent payload automatic processing #103

Merged
merged 1 commit into from
Jan 11, 2023

Conversation

elmendalerenda
Copy link
Contributor

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

@elia
Copy link
Member

elia commented Sep 19, 2019

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.

@elia elia added the bug label Sep 19, 2019
@elia elia self-requested a review September 19, 2019 21:06
@elia elia merged commit a811015 into opal:master Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants