Skip to content

Conversation

ajitsinghkaler
Copy link
Contributor

@ajitsinghkaler ajitsinghkaler commented Jul 2, 2020

boolean is a valid json but at present we cannot test Http request using boolean added support for boolean requests

Fixes #20690

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: #20690

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@ajitsinghkaler ajitsinghkaler marked this pull request as draft July 2, 2020 15:21
@ajitsinghkaler ajitsinghkaler marked this pull request as ready for review July 2, 2020 15:46
@@ -155,7 +159,7 @@ function _toJsonBody(
throw new Error(`Automatic conversion to ${format} is not supported for Blobs.`);
}
if (typeof body === 'string' || typeof body === 'number' || typeof body === 'object' ||
Array.isArray(body)) {
typeof body === 'boolean' || Array.isArray(body)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are here, you don't need to do the Array.isArray check because typeof body === 'object' will be true already

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ajitsinghkaler feel free to remove this in another PR

Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from the public API point of view (type widening and assuming that we don't support extension of TestRequest). Still need the confirmation from the area owner (@alxhub)

Reviewed-for: public-api
Reviewed-for: fw-testing

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Reviewed-for: public-api

@pullapprove pullapprove bot removed the request for review from IgorMinar July 22, 2020 09:45
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: public-api

@petebacondarwin petebacondarwin added freq1: low action: presubmit The PR is in need of a google3 presubmit action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release type: bug/fix labels Jul 22, 2020
@mhevery mhevery added the area: common Issues related to APIs in the @angular/common package label Jul 28, 2020
@ngbot ngbot bot added this to the needsTriage milestone Jul 28, 2020
@ajitsinghkaler
Copy link
Contributor Author

@AndrewKushnir can you please run a presubmit on this

@AndrewKushnir
Copy link
Contributor

Presubmit

@AndrewKushnir
Copy link
Contributor

@ajitsinghkaler FYI the presubmit went well. Here is a couple of next steps:

  • could you please rebase this PR to re-run CI with the most up-to-date version? (it looks like this PR was rebased 21 days ago)
  • this PR needs approval from fw-core and fw-http groups (@alxhub could you please have a quick look when you get a chance?)

Thank you.

@ajitsinghkaler
Copy link
Contributor Author

@AndrewKushnir rebased it

@AndrewKushnir AndrewKushnir removed the action: presubmit The PR is in need of a google3 presubmit label Aug 14, 2020
@ajitsinghkaler
Copy link
Contributor Author

@alxhub can you please review this

@pullapprove pullapprove bot requested a review from IgorMinar September 28, 2020 20:30
Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @ajitsinghkaler!

Reviewed-for: public-api

@pullapprove pullapprove bot requested a review from IgorMinar October 5, 2020 19:50
Copy link
Contributor

@IgorMinar IgorMinar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed-for: global-approvers

@IgorMinar IgorMinar removed the request for review from alxhub October 5, 2020 19:50
@IgorMinar IgorMinar added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 5, 2020
@ajitsinghkaler ajitsinghkaler deleted the boolean-test branch October 6, 2020 02:13
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: common Issues related to APIs in the @angular/common package cla: yes freq1: low target: major This PR is targeted for the next major release type: bug/fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Testing - HttpTestingController throws errors for valid JSON
9 participants