I want to chain multiple request to the urls which I get from the array. Before next chain i want to wait for the previous one to finish. It's does not matter if the previous fails or not. I was trying to this with forkJoin but I know that if one of the request fails it will return error.
this.dataServers.forEach(dataServer => {
observableBatch.push(this.getFoodsByQuery(dataServer.url, query));
});
return Observable.forkJoin(observableBatch).subscribe(data => {
this.searchingServer.next(null);
observer.complete();
});
I do not know how to do this with flatMap.