Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(http): allow for child
HttpClient
s to request via parents (#47502
) Ordinarily, providing `HttpClient` (either via `provideHttpClient` or the `HttpClientModule`) creates an entirely separate HTTP context. Requests made via that client are not passed through the interceptor chains that are configured in a parent injector, for this example. This commit introduces a new option for `provideHttpClient` called `withRequestsMadeViaParent()`. When this option is passed, requests made in the child context flow through any injectors, etc. and are then handed off to the parent context. This addresses a longstanding issue with interceptors where it's not possible to extend the set of interceptors in a child context without repeating all of the interceptors from the parent. PR Close #47502
- Loading branch information
1 parent
62c7a7a
commit 3ba99e2
Showing
4 changed files
with
126 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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