I'm currently working with Angular 11 and looking to make an HTTP call to an API that will trigger a server-side process.
Here's the code for the HTTP call:
processData(data) {
return this.httpClient.post('https://myurl/api/process', {
data: data
},
{
headers: this.headers()
});
}
Once this call is made, the API will initiate a process on the server and handle its operations.
Since this process might take some time to complete, I want Angular to actively listen for various responses, such as progress updates sent by the server.
This way, Angular can provide real-time feedback to the user regarding the progress of the operation and prevent timeouts while waiting for the final result.
Is it possible to achieve this functionality in Angular? If so, how can it be implemented?