0

I have long lived requests (few min or more), and I wanna see which call is in pending state from my code, so I don't trigger it again.

How can I see that?

Perp
  • 364
  • 7
  • 15
  • 2
    You create an object where you store some unique id for each request when it starts and you remove it when the request is completed. – Gabriele Petrioli May 26 '20 at 14:26
  • Ye, I guess that could be solved manually like that... I thought axios has some internal magic that will allow me to just hook into it and inspect pending requests... – Perp May 26 '20 at 15:13
  • 1
    it does not, as far as i know. You could use interceptors though to automate it. See https://stackoverflow.com/questions/44670782/know-if-there-are-pending-request-in-axios – Gabriele Petrioli May 26 '20 at 15:26
  • If it had such internal magic you would be better off reading the docs and the source code. – The Fool May 26 '20 at 15:42

0 Answers0