8000 feat(http): add keepalive support for fetch requests in httpResource by SkyZeroZx · Pull Request #61833 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content

feat(http): add keepalive support for fetch requests in httpResource #61833

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

Closed
wants to merge 1 commit into from

Conversation

SkyZeroZx
Copy link
Contributor
@SkyZeroZx SkyZeroZx commented Jun 2, 2025

This commit adds support for the Fetch API's keepalive option when using httpResource with the withFetch provider.

The keepalive option is particularly useful for:

Beacon API-like functionality (logging analytics on page unload)
Better control over connection management in long-lived applications

Example new usage :

httpResource(() => ({
  url: '/api/log',
  method: 'POST',
  keepalive: true,
}));

@pullapprove pullapprove bot requested a review from AndrewKushnir June 2, 2025 19: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 Jun 2, 2025
@ngbot ngbot bot added this to the Backlog milestone Jun 2, 2025
@AndrewKushnir AndrewKushnir requested review from alxhub and removed request for AndrewKushnir June 4, 2025 01:18
Copy link
@cyber-hari cyber-hari left a comment

Choose a reason for hiding this comment

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

LGTM!

@SkyZeroZx
Copy link
Contributor Author
8000 SkyZeroZx commented Jun 9, 2025

@alxhub Is any additional validation needed to be able to merge it?

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 added action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release labels Jun 24, 2025
@JeanMeche JeanMeche removed the action: merge The PR is ready for merge by the caretaker label Jun 24, 2025
This commit adds support for the Fetch API's keepalive option when using httpResource with the withFetch provider
@thePunderWoman thePunderWoman force-pushed the add-keepalive-httpresource branch from 68629eb to 30290b1 Compare June 24, 2025 12:53
Copy link
Contributor
@kirjs kirjs 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 thePunderWoman added the action: merge The PR is ready for merge by the caretaker label Jun 24, 2025
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit 73269cf.

The changes were merged into the following branches: main

@SkyZeroZx SkyZeroZx deleted the add-keepalive-httpresource branch June 26, 2025 01:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

6 participants
0