I want to send 10 requests that are independent, one after the other in sequence. and want to get all the results in an array. I have tried forkJoin
but it hit all the requests in parallel.
For parallel requests
search(queryUrls) {
queryUrls.forEach((query) => {
observableBatch.push(this.http.post(query.url, query.data))
.pipe(
map((res) => res),
catchError(e => of('Error'))
);
});
//
return forkJoin(observableBatch);
}
and I can subscribe this method and can get all the results in an array. but how can I send all the requests in sequence?