Repository navigation
Conversation
thePunderWoman
approved these changes
Jun 27, 2025
thePunderWoman
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Thank you!
reviewed-for: fw-general, public-api
alan-agius4
reviewed
Jun 27, 2025
alan-agius4
reviewed
Jun 27, 2025
alan-agius4
reviewed
Jun 27, 2025
JeanMeche
force-pushed
the
add-fetch-control
branch
2 times, most recently
from
June 27, 2025 12:24
af458f9 to
93cc91a
Compare
…ient Add support for mode and redirect options in Angular's HttpClient based on fech provider to enable control CORS behavior and redirect handling
thePunderWoman
force-pushed
the
add-fetch-control
branch
from
June 27, 2025 12:40
bb286ff to
7fb51c6
Compare
Contributor
|
This PR was merged into the repository by commit 8732244. The changes were merged into the following branches: main |
AndrewKushnir
added a commit
to AndrewKushnir/angular
that referenced
this pull request
Jun 27, 2025
…n HttpClient (angular#62315)" This reverts commit 8732244.
AndrewKushnir
added a commit
to AndrewKushnir/angular
that referenced
this pull request
Jun 27, 2025
…n HttpClient (angular#62315)" This reverts commit 8732244.
4 of 14 tasks
|
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. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This commit adds support for the Fetch API's
modeandredirectoptions when usingHttpClientwith thewithFetchprovider.The change includes:
modeandredirectto theHttpRequestInitinterfaceFetchBackendto pass the optionsMotivation / Use Cases
The
modeandredirectoptions are particularly useful for:mode controls the request's CORS policy ('cors', 'no-cors', 'same-origin'), helping manage security boundaries and cross-origin resource sharing.
redirect determines how redirects are handled ('follow', 'manual', 'error'), allowing developers to explicitly accept, reject, or handle redirections manually.
These options help ensure secure data access across origins, enforce strict network policies, and give developers more control over how external resources are handled.
Proposed Solution
modeandredirectto theHttpRequestInitinterfaceHttpRequestclassFetchBackendto the native Fetch APIExamples of New Usage