8000 Expose keepalive in httpResource · Issue #61831 · angular/angular · GitHub
[go: up one dir, main page]

Skip to content
Expose keepalive in httpResource #61831
Closed
@SkyZeroZx

Description

@SkyZeroZx

Which @angular/* package(s) are relevant/related to the feature request?

common

Description

Currently, Angular's httpResource doesn't expose the keepalive option from the underlying Fetch API. This feature would allow developers to control whether the connection should be kept alive for future requests

Proposed solution

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

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

Alternatives considered

If exist a way to do what Im explaining here, please let me know it because I didn't see any info related to do that inside of angular documentation (angular.dev)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0