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

Fix an error when using URLSearchParams with fetch #680

Merged
merged 1 commit into from
Oct 29, 2019
Merged

Fix an error when using URLSearchParams with fetch #680

merged 1 commit into from
Oct 29, 2019

Conversation

huww98
Copy link
Contributor

@huww98 huww98 commented Oct 29, 2019

Fix the following error occurred in WeChat Windows client (based on Chrome 53 from UA), when passing an URLSearchParams as body and not passing headers.

message: "Failed to construct 'Headers': No matching constructor signature."
stack: TypeError: Failed to construct 'Headers': No matching constructor signature.
at TypeError (native)
at fetch (webpack-internal:///./node_modules/core-js/modules/web.url-search-params.js:328:23)
at _callee$ (webpack-internal:///./src/api/internal.ts:180:20)
at tryCatch (webpack-internal:///./node_modules/regenerator-runtime/runtime.js:45:40)
...

Fix the following error occurred in WeChat Windows client (based on Chrome 53 from UA), when passing an `URLSearchParams` as body not not passing headers.

message: "Failed to construct 'Headers': No matching constructor signature."
stack: TypeError: Failed to construct 'Headers': No matching constructor signature.
 at TypeError (native)
 at fetch (webpack-internal:///./node_modules/core-js/modules/web.url-search-params.js:328:23)
 at _callee$ (webpack-internal:///./src/api/internal.ts:180:20)
 at tryCatch (webpack-internal:///./node_modules/regenerator-runtime/runtime.js:45:40)
...
@zloirock
Copy link
Owner

Hmm... Interesting, thanks.

@zloirock
Copy link
Owner

It seems to need to check it with some other early fetch implementations.

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

Successfully merging this pull request may close these issues.

2 participants