HttpClient
Angular's service for calling web APIs.
What is HttpClient?
HttpClient is Angular's service for calling web APIs. Its methods (get, post, put, delete) return Observables with the response data.
export class WeatherService {
private http = inject(HttpClient);
today(city: string) {
return this.http.get<Forecast>(`/api/weather/${city}`);
}
}
Level: Apprentice · More Angular terms at this level
Updated