Вам нужно использовать forkJoin из rxjs
import { forkJoin } from "rxjs/observable/forkJoin"; // Maybe import from 'rxjs' directly (based on the version)
...
public multipleRequestMethod() {
const firstCall = this.http.get('www.example.com/records/?count=50');
const secondCall = this.http.get('www.example.com/records/?count=50&lastID=FAKEID');
return forkJoin(firstCall, secondCall).pipe(
map([firstResponse, secondResponse] => [...firstResponse, ...secondResponse])
)
}
Дополнительная информация: Здесь
Если вы хотите использовать ответ от первого запроса, тогда вам нужно использовать flatMap/ switchMap
import { map, flatMap } from 'rxjs/operators';
...
public multipleRequestMethod() {
return this.http.get('www.example.com/records/?count=50').pipe(
flatMap(firstResult => {
return this.http.get('www.example.com/records/?count=50&lastID=' + firstResult[firstResult.length - 1].id).pipe(
map(secondResult => [firstResult, secondResult])
);
})
);
}