There is more than one way to communicate over HTTP. One way is using the XmlHttpRequest object, but that is a quite cumbersome and low-level way of doing it. Another way is to use the new fetch API, which you can read more about here: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API.
Angular has its own abstraction, the HTTP service, which can be found in the HTTPModule. To use it, simply import the HttpModule:
import { HttpClientModule } from '@angular/common/http';@NgModule({ imports: [HttpClientModule]})
Then, inject the HttpClient service where you want to use it, like so:
import { HttpClient } from '@angular/common/http';@Component({ selector: 'consumer', template: ``})export class ConsumerComponent ...