Skip to content

Conversation

@SkyZeroZx
Copy link
Contributor

Currently, Angular's httpResource does not expose the credentials option from the underlying Fetch API.

Exposing this option would allow developers to explicitly control how cookies, authorization headers, and TLS client certificates are handled in cross-origin requests, aligning with security requirements and enabling better integration with external APIs.

New usage

httpResource(() => ({
  url: '${ANOTHER_DOMAIN}/api/register',
  method: 'POST',
  credentials: 'include'
}));

This commit adds support for the Fetch API's credentials option when using httpResource with the withFetch provider
@pullapprove pullapprove bot requested a review from alxhub July 1, 2025 01:11
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: common/http Issues related to HTTP and HTTP Client labels Jul 1, 2025
@ngbot ngbot bot added this to the Backlog milestone Jul 1, 2025
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

reviewed-for: fw-general, public-api

@thePunderWoman thePunderWoman removed the request for review from alxhub July 1, 2025 08:30
@thePunderWoman thePunderWoman added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Jul 1, 2025
@thePunderWoman thePunderWoman requested review from crisbeto and removed request for alxhub, atscott and pkozlowski-opensource July 1, 2025 09:37
@pullapprove pullapprove bot requested review from alxhub and devversion July 1, 2025 09:37
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

Reviewed-for: public-api

@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit b6ef428.

The changes were merged into the following branches: main

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Aug 1, 2025
@SkyZeroZx SkyZeroZx deleted the add-credentials-httpResource branch December 17, 2025 21:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: common/http Issues related to HTTP and HTTP Client detected: feature PR contains a feature commit target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants