Angular · Middle · Question 53 of 75
How do you retry a failed HTTP request three times with a delay?
this.http.get('/api/data').pipe(retry({ count: 3, delay: 1000 }))- ✓Correct answer: Use the
retryoperator withcountanddelay - 2Call
subscribeagain in the error handler forever - 3
HttpClientretries automatically
Explanation
Retry only idempotent requests (like GET). delay can be a function for exponential backoff.