How to send multiple requests at once in JavaScript?

  • 0
    Good evening, faced the need to send multiple requests using the axios library. Question. How to implement this? With using what? Is multithreading suitable here or am I confusing something?
    JavaScript Anonymous, Jan 2, 2019

  • 1 Answers
  • 0
    Will multithreading work, or am I confusing something?
    There is no multithreading in JS.

    How to implement this? What?
    Just send multiple requests at once. Requests work asynchronously and do not block the execution flow.

    If you need to wait for several answers at once, there is Promise.all and Promise.allSettled



    P.S. why drag heavy and limiting axios functionality into the application when there is a native fetch ?
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!