In this example, the AppComponent class defines a getData method that sends an HTTP GET request to /api/data and handles the response using the subscribe
In this example, the AppComponent class defines a getData method that sends an HTTP GET request to /api/data and handles the response using the subscribe