Skip to content
New issue

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

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

Already on GitHub? # to your account

Use superagent.send to avoid mangling FormData #879

Merged
merged 1 commit into from
Oct 13, 2016

Conversation

Pchelolo
Copy link

The merged fix for #877 doesn't work since actually in older chrome, safari and IE there's no way to get access to FormData contents ( http://stackoverflow.com/a/33821488/1924141 ) however SuperAgent supports getting a ready FormData, so could we just give it to it?

This fixes basic POST support in Safari and older chrome, but I'm not sure if it breaks some other use-cases since the FormData branches seem to be not covered with unit tests

@fehguy
Copy link
Contributor

fehguy commented Oct 12, 2016

I don't see an issue for this in Safari Version 10.0 (11602.1.50.0.10) or in IE 11.0.9600.17416. I'm testing the spec at http://petstore.swagger.io/v2/swagger.json

I'd like to have this fixed so I can do a release, so please send more information on how to reproduce the issue.

@Pchelolo
Copy link
Author

@fehguy Here's an example: https://en.wikipedia.org/api/rest_v1/#!/Transforms/post_transform_wikitext_to_html_title_revision

Add whatever text to the wiki text parameter and hit Try it out in Safari 10 - you'll see the error

@fehguy
Copy link
Contributor

fehguy commented Oct 12, 2016

thank you, I'll test with that spec.

@fehguy
Copy link
Contributor

fehguy commented Oct 12, 2016

@Pchelolo I've reproduced this, working on a fix. I'm looking into why we aren't using superagent's form send, there was a good reason at the time...

@fehguy fehguy merged commit 9792959 into swagger-api:master Oct 13, 2016
@fehguy fehguy modified the milestone: v2.1.23 Oct 13, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants