Angular service call is as shown below,
SearchAssets(searchAssetsModel: SearchAssetsModel): Observable<any> {
return this.httpClient.post<any>(this.webApiUrl + "SearchAssets/SearchAssets/", searchAssetsModel);
}
and in my component, am subscribing to the service as shown below,
this.searchAssetsService.SearchAssets(searchAssetsModel).subscribe(
(data) => {}
)
For sure API will return the data after 2-3 minutes of service call but now the problem is Angular service is not waiting until the API returns the data. It will give 500 error response after waiting for 1.5 minutes.