Skip to content
Advertisement

RxJS – Processing HTTPrequests in sequence

I’m currently trying to process HTTP Post requests in sequence, additionally trying to repeat each failed request until it succeeds (that is a requirement) and then and only then to continue with processing other requests. My code looks like this for now (it not working as it should, retryWhen is not used properly, I am aware of that, it’s used just as a starting point reference):

JavaScript

Advertisement

Answer

You’re close!

Just attach your retry to the promise rather than the concatenated stream as a whole.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement