Skip to content

Expose redirected and responseType on HttpResourceRef#67429

Open
SkyZeroZx wants to merge 4 commits intoangular:mainfrom
SkyZeroZx:feature/httpresource-add-redirected-responsetype
Open

Expose redirected and responseType on HttpResourceRef#67429
SkyZeroZx wants to merge 4 commits intoangular:mainfrom
SkyZeroZx:feature/httpresource-add-redirected-responsetype

Conversation

@SkyZeroZx
Copy link
Contributor

@SkyZeroZx SkyZeroZx commented Mar 4, 2026

On top #64551

Expose redirected and responseType on HttpResourceRef, aligning it with
the underlying HTTP response metadata in the Fetch API and allowing consumers
to inspect redirects and the response type used.

What is the new behavior?

We can now access redirected and responseType

const config = httpResource(() => '/api/config');

config.redirected();
config.responseType()

…ponse

Fixes omission of redirected and responseType from the Fetch API in HttpErrorResponse when the promise fails or when an error occurs while parsing the response body.
…roller.expectOne flush

Add support for `redirected` and `responseType` parameters in the `flush` method of `HttpTestingController.expectOne` to properly validate Fetch Response API behavior in unit tests.
…hHttpTransferCacheOptions

Add `redirected` and `responseType` support to the transfer cache when using `withHttpTransferCacheOptions`, ensuring these fields are included in the cached transfer state.
Expose `redirected` and `responseType` on `HttpResourceRef`, aligning it with
the underlying HTTP response metadata in the Fetch API and allowing consumers
to inspect redirects and the response type used.
@pullapprove pullapprove bot requested a review from AndrewKushnir March 4, 2026 01:36
@SkyZeroZx SkyZeroZx changed the title Feature/httpresource add redirected responsetype Expose redirected and responseType on HttpResourceRef Mar 4, 2026
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: common/http Issues related to HTTP and HTTP Client labels Mar 4, 2026
@ngbot ngbot bot added this to the Backlog milestone Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: common/http Issues related to HTTP and HTTP Client detected: feature PR contains a feature commit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant