Here is my code. http is HTTPClient object in angular/common/http module.
extractMainContentFromServer(payload): Promise<any> {
this.isLoadingSubject.next(true);
return this.http.post<any>(
`${API_DAEMON_URL}/daemons/extractMainContent`,
payload,
{
headers: KTUtil.getAPIHeaders()
}
).pipe(
catchError( err => {
if (err && err.error.message == 'RUNNING NIGHTMARE') {
this.toastService.show('Server is running, please
edit later');
}
return of(undefined);
}),
finalize(() => this.isLoadingSubject.next(false))
).toPromise();
}
I done extensive research on Internet, seems no way with angular httpclient. It just keeps rerequesting after 60s. I don't want this timeout. Could be there possibly other way to post request with unlimited timeout? Thank you so much in advance.