-2

I have one rest request, it is called several times, and after all its successful responses, I need to call another, how can this be done?

I found these two rests, in the normal state they are called in turn in the exact sequence I need, but if there are a large number of requests, the process breaks

whodastack
  • 17
  • 4

1 Answers1

1

Please check the asynchronous pattern https://www.w3schools.com/js/js_async.asp .You can use await keyword to wait for a request completely, then check the response and decide whether to continue to call another API.

Ha Tai
  • 69
  • 4