Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat(http): add checker for required interceptor registration #59018

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
Loading
from

Conversation

Sepandard
Copy link

resolves #57409

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Minimal code changes to integrate new functionality or tests
  • Code maintains backward compatibility
  • All tests pass successfully

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.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

  • Added utility functions and corresponding test cases for setting XSRF tokens and tagging HTTP requests.
  • Improved test coverage with minimal code changes and ensured backward compatibility.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

  • All tests are designed to integrate seamlessly without affecting existing functionality.

@pullapprove pullapprove bot requested a review from AndrewKushnir December 3, 2024 08:55
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Dec 3, 2024
@pkozlowski-opensource pkozlowski-opensource added action: review The PR is still awaiting reviews from at least one requested reviewer area: common/http Issues related to HTTP and HTTP Client labels Dec 3, 2024
@ngbot ngbot bot modified the milestone: Backlog Dec 3, 2024
adev/src/content/guide/http/interceptors.md Outdated Show resolved Hide resolved
packages/common/http/src/provider.ts Outdated Show resolved Hide resolved
packages/common/http/src/provider.ts Outdated Show resolved Hide resolved
packages/common/http/src/provider.ts Outdated Show resolved Hide resolved
@Sepandard Sepandard force-pushed the add-check-interceptor-provided branch from 2d1987d to 9479650 Compare December 15, 2024 12:31
@angular-robot angular-robot bot removed the area: common/http Issues related to HTTP and HTTP Client label Dec 15, 2024
@Sepandard Sepandard requested a review from JeanMeche December 15, 2024 12:31
@ngbot ngbot bot removed this from the Backlog milestone Dec 15, 2024
@Sepandard Sepandard force-pushed the add-check-interceptor-provided branch from 9479650 to 8497098 Compare December 17, 2024 08:08
@josephperrott josephperrott added the area: common/http Issues related to HTTP and HTTP Client label Dec 19, 2024
@ngbot ngbot bot added this to the Backlog milestone Dec 19, 2024
@thePunderWoman thePunderWoman marked this pull request as draft May 21, 2025 15:31
@thePunderWoman thePunderWoman removed the request for review from AndrewKushnir June 3, 2025 11:06
@JeanMeche JeanMeche force-pushed the add-check-interceptor-provided branch from 8497098 to cf89a26 Compare June 5, 2025 08:50
@JeanMeche JeanMeche marked this pull request as ready for review June 5, 2025 10:16
@pullapprove pullapprove bot requested a review from atscott June 5, 2025 10:16
@JeanMeche JeanMeche force-pushed the add-check-interceptor-provided branch 4 times, most recently from 76c006a to 3b73cde Compare June 5, 2025 10:57
@JeanMeche JeanMeche requested a review from thePunderWoman June 5, 2025 10:57
Copy link
Contributor

@thePunderWoman thePunderWoman left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

reviewed-for: fw-general, public-api, angular-dev

@thePunderWoman thePunderWoman removed the request for review from atscott June 5, 2025 11:01
@pullapprove pullapprove bot requested review from AndrewKushnir, kirjs and mmalerba June 5, 2025 11:02
@thePunderWoman thePunderWoman added the target: patch This PR is targeted for the next patch release label Jun 5, 2025
Introduced a CHECKED_INTERCEPTORS token to track registered interceptors.
Added logic in withInterceptors to register interceptor names and validate their presence.
Added ensureInterceptorRegistered utility to enforce the registration of mandatory interceptors.
update tests and document

resolves angular#57409
@JeanMeche JeanMeche force-pushed the add-check-interceptor-provided branch from 3b73cde to 6ef2aed Compare June 5, 2025 11:14
@thePunderWoman thePunderWoman 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 Jun 5, 2025
@AndrewKushnir AndrewKushnir added action: discuss and removed action: merge The PR is ready for merge by the caretaker labels Jun 5, 2025
@Sepandard
Copy link
Author

Sepandard commented Jun 10, 2025

could you let me know if there are any outstanding concerns with this PR. Happy to make adjustments if needed.
Thanks!
@AndrewKushnir

@mmalerba mmalerba removed their request for review June 11, 2025 15:47
@pullapprove pullapprove bot requested a review from alxhub June 11, 2025 15:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: discuss area: common/http Issues related to HTTP and HTTP Client detected: feature PR contains a feature commit target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check if a http interceptor is provided
6 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.