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 }))

Explanation

Retry only idempotent requests (like GET). delay can be a function for exponential backoff.

Further reading

Problem with a question

Angular · Middle · question 53

Test yourself

Take the Angular · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz