HttpClient là service chính thức để gọi HTTP API, trả về Observable và hỗ trợ typed response, interceptors, params, headers, progress events và testing utilities.
Trong standalone app thường cấu hình bằng provideHttpClient(). Vì Observable của HTTP request là cold, request chỉ chạy khi được subscribe, ví dụ qua service, async pipe hoặc bridge sang signal.
HttpClient is the official service for calling HTTP APIs, returning Observables and supporting typed responses, interceptors, params, headers, progress events and testing utilities.
In a standalone app it is usually configured with provideHttpClient(). Since HTTP Observables are cold, the request only runs when subscribed, for example through a service, the async pipe or a bridge to signals.