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

Request + URLSearchParams doesn't work as expected with polyfill-library + core-js #171

Closed
romainmenke opened this issue Jul 23, 2021 · 1 comment

Comments

@romainmenke
Copy link
Member

romainmenke commented Jul 23, 2021

test : BodyInit unions URLSearchParams

(function (cb) {
	new Request('#', { body: new URLSearchParams({ foo: 'baz' }), method: 'POST' }).text().then(function(x) {
                // x is an empty string
		cb(x === 'foo=baz');
	});
})(callback);

core-js only wraps window.fetch without patching other parts like Request.

Unsure at this point how to resolve.

  • use URLSearchParams from polyfill-library and exclude the one from core-js
  • patch core-js so that Request works as expected.
  • patch detect script in fetch polyfill.
@romainmenke
Copy link
Member Author

Numbers going up : 9cf0720

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

No branches or pull requests

1 participant