Angular v20 introduces the httpResource API as an improvement over the Resource API. Built on top of HttpClient, it enables proper interceptor functionality and testing tool compatibility while maintaining signal-based reactive data fetching. The API supports schema validation with libraries like Zod, automatic request cancellation, and various response types including text, blob, and arrayBuffer. It's designed specifically for data fetching operations and should not be used for mutations like POST or PUT requests.
Table of contents
Working with InterceptorsSchema ValidationDefault ValueThe httpResource and HttpClientMaking an Advanced RequestReturned SignalsOther Response TypeSummarySort: