I have a simple request that I would like to repeat in case the response is with status 202. Currently, it looks like this:
this.http.get(endPoint, {
withCredentials: true,
headers: this.headers
})
.map((response: Response) => {
return response.text() ? response.json() : '';
})
.catch((error) => this.handleError(error));
I have tried with .repeatWhen() but unfortunately, I don't receive the Response object and I cannot set a validation by the status code.
Any ideas how can I do that?