pipe应该可以通过 Rxjs 的,timeout和的组合来实现retry。如果timeout超过,retry4次,否则,catchError。
return this.httpClient.post(url, data, httpOptions).pipe(
timeout(3000),
retry(4),
catchError(<DO SOMETHING>)
);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2890 次 |
| 最近记录: |