{{ message }}
feat(http): provide injection token to inspect configured interceptors - #70583
Open
AyushDubey23 wants to merge 1 commit into
Open
feat(http): provide injection token to inspect configured interceptors#70583AyushDubey23 wants to merge 1 commit into
AyushDubey23 wants to merge 1 commit into
Conversation
Introduce the HTTP_CONFIGURED_INTERCEPTOR_FNS injection token, which resolves to a ReadonlySet<HttpInterceptorFn> containing all functional HTTP interceptors configured for the current HttpClient instance. When withRequestsMadeViaParent() is configured on the current HttpClient, parent interceptors are recursively included into the set. Fixes angular#57409
JeanMeche
reviewed
Sep 6, 2026
Member
There was a problem hiding this comment.
Suggested change
The http client is provided in root, it should also work without the provide function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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, there is no public API or injection token allowing libraries and consumers to inspect which functional HTTP interceptors are configured for an
HttpClientinstance. This makes it difficult for library authors (such as auth or telemetry packages) to verify or guard against missing required interceptors.Issue Number: Fixes #57409
What is the new behavior?
Introduces the
HTTP_CONFIGURED_INTERCEPTOR_FNSinjection token, which resolves to aReadonlySet<HttpInterceptorFn>containing all functional interceptors configured for the activeHttpClient.Key details:
withInterceptorsas well as root-level interceptors (HTTP_ROOT_INTERCEPTOR_FNS).withRequestsMadeViaParent()is configured on the client.inject(HTTP_CONFIGURED_INTERCEPTOR_FNS).has(myInterceptorFn)).Does this PR introduce a breaking change?
Other information
Follows the design suggested by @alxhub in #57409 (comment).