Most front-end applications use either XMLHttpRequest interface or the fetch() API to communicate with backend services over HTTP protocol. For the same purpose, Angular provides a simplified client HTTP API known as HttpClient. This is based on top of the XMLHttpRequest interface. This HttpClient is available in the @angular/common/http package, which you can import into your root module as follows:
import { HttpClientModule } from '@angular/common/http';
Following are some of the crucial advantages of HttpClient:
Submitted questions and answers are subject to review and editing, and may or may not be selected for posting, at the sole discretion of w3Sniff.
Get Started
Comments
Leave a Comment