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
feat(http): add has() method to HttpContext class
#43887
Conversation
|
@HyperLife1119 - thanks for this PR. |
I think it should be ok. |
|
Great! As expected we now have a couple more steps due to the new public API. Please run And then save it as a fixup commit (e.g. |
I finished. |
|
One more rebase please @HyperLife1119 - then I think we are good on this. |
|
You seem to have automatically closed the PR by pushing zero commits? Did you accidentally reset the branch to master rather than rebasing? |
|
Wait a minute, i'm recovering... |
|
I think this is the commit you need 8ba2a36 |
|
It should be ok now. @petebacondarwin |
|
All right. @petebacondarwin |
At present, the get() method provided by HttpContext will never return null. Sometimes we need to check whether an http token is included, so add the has() method to HttpContext.
|
This is my first PR to angular, thank you for your guidance. @petebacondarwin |
@HyperLife1119 thanks for contributing to Angular!
I just wanted to mention that this change adds some non-tree-shakable code to app bundles in case HTTP package is used. However the added code would be small and the new API looks reasonable (and somewhat missing in the current implementation), so we can probably justify that minimal size increase.
Reviewed-for: public-api
LGTM
Thanks for your contribution!
reviewed-for: public-api
|
This PR was merged into the repository by commit d452b38. |
|
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. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

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?
Unable to determine whether a certain token exists in
HttpContext.What is the new behavior?
Use the
has()method provided byHttpContextto detect whether a certain token existsDoes this PR introduce a breaking change?
Other information
The text was updated successfully, but these errors were encountered: