📜  rxjs 的 api 调用序列 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:24.228000             🧑  作者: Mango

代码示例1
firstPOSTCallToAPI('url', data).pipe(
    concatMap(result1 => secondPOSTCallToAPI('url', result1))
      concatMap( result2 => thirdPOSTCallToAPI('url', result2))
       concatMap(result3 => fourthPOSTCallToAPI('url', result3))
    ....
).subscribe(
    success => { /* display success msg */ },
    errorData => { /* display error msg */ }
);