fix(common): add right ContentType for boolean values with HttpClient request body(#38924)#41885
fix(common): add right ContentType for boolean values with HttpClient request body(#38924)#41885gopal-jayaraman wants to merge 1 commit intoangular:masterfrom
Conversation
189005f to
97f144d
Compare
petebacondarwin
left a comment
There was a problem hiding this comment.
I know this shouldn't be a breaking change, but I wonder if it would actually break some people who have relied on booleans being marked as text...
f76484a to
d1bee36
Compare
packages/common/http/src/request.ts
Outdated
There was a problem hiding this comment.
Array.isArray is redundant because this.body is an object in that case
There was a problem hiding this comment.
P.S.: Update the comment in line 325
There was a problem hiding this comment.
@alfaproject - I have updated the review comments, Please check.
… request body(angular#38924) currently a boolean as body is seen as text/plain, where is should be seen as application/json, since it is valid JSON, like numbers.
d1bee36 to
1cb2bdb
Compare
|
@petebacondarwin FYI presubmits are successful for the changes in this PR. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
We are adding application/json as ContentType for boolean as the body, currently it is seen as text/plain, where it should be seen as application/json, since it is valid JSON, like numbers.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
currently a boolean as the body is seen as text/plain, where it should be seen as application/json, since it is valid JSON, like numbers.
Issue Number: #38924
What is the new behavior?
currently a boolean as the body is seen as text/plain, where it should be seen as application/json, since it is valid JSON, like numbers.
Does this PR introduce a breaking change?
Other information