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

URLSearchParams passed to Request does not set the correct body and headers #965

Closed
romainmenke opened this issue Jul 23, 2021 · 6 comments
Closed

Comments

@romainmenke
Copy link

@romainmenke romainmenke commented Jul 23, 2021

This is essentially the same issue as : #674

A similar wrapper for Request might resolve this.
Request being a constructor whereas fetch is just a function might complicate things :/

see : mrhenry/web-tests#171

(maybe this should not be fixed here, that is also fine!)

@zloirock
Copy link
Owner

@zloirock zloirock commented Jul 23, 2021

Thanks for the report. Could you add a PR?

Loading

@romainmenke
Copy link
Author

@romainmenke romainmenke commented Jul 23, 2021

I have some time this weekend and will give it a shot!
Thank you for the quick response :)

Loading

@romainmenke
Copy link
Author

@romainmenke romainmenke commented Jul 25, 2021

Still not sure about patching Request in core-js.
Having some non-ecma features in core-js complicates things and don't really want to expand that surface.

Hoping to resolve this through : Financial-Times/polyfill-library#1077

Loading

@zloirock
Copy link
Owner

@zloirock zloirock commented Jul 25, 2021

It should be solved by patching of Request since it should work with any implementation and bad support of URLSearchParams is not a reason to polyfill fetch / Request.

Loading

@zloirock zloirock closed this in 379c629 Jul 26, 2021
@romainmenke
Copy link
Author

@romainmenke romainmenke commented Jul 26, 2021

Thank you @zloirock

Seeing the final code I don't think I would have gotten there smoothly :)
You are also right that this should be fixed for any fetch implementation.

Loading

@romainmenke
Copy link
Author

@romainmenke romainmenke commented Jul 30, 2021

Thank you fo the quick release.
First test results indicate that this is now working for a lot more browsers!

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants