Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当呼叫在挂起时停留超过几秒钟时,Angular 中是否可以重试连接?
应该可以使用pipe,timeout和retryRxjs 的组合。如果timeout超过,retry4次,否则,catchError。
pipe
timeout
retry
catchError
return this.httpClient.post(url, data, httpOptions).pipe( timeout(3000), retry(4), catchError(<DO SOMETHING>) );