Visitar URL original
fix(http): Add support for requesting body as URLSearchParams type by sera0731 · Pull Request #37767 · angular/angular · GitHub
The Wayback Machine - https://web.archive.org/web/20200628001727/https://github.com/angular/angular/pull/37767
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(http): Add support for requesting body as URLSearchParams type #37767

Open
wants to merge 4 commits into
base: master
from

Conversation

@sera0731
Copy link

sera0731 commented Jun 26, 2020 •

There is no support for URLSearchParams type request in the current version. This commit adds serialize body function for URLSearchParams type.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.io application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: 36317

There is no support for URLSearchParams type request in the current version. When a user passes the body parameter with this type, Angular considers it as a random object. It ends up being omitted.

What is the new behavior?

This commit adds serialization for URLSearchParams type. It will handle URLSearchParams type request, it will not be omitted.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

There is no support for URLSearchParams type request in the current version. This commit adds serialize body function for URLSearchParams type.
@googlebot googlebot added the cla: yes label Jun 26, 2020
@pullapprove pullapprove bot requested a review from alxhub Jun 26, 2020
sera0731 added 3 commits Jun 26, 2020
IE doesn't support URLSearchParams. There was no condition for an unsupported browser. It will fix unit test failure.
The If clause was not properly formatted. Bazel format command solved this issue to correct the file's format.
As per alfaproject's review, I changed isURLSearchParams input parameter value's type from any to unknown.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.