2

What happens if I make the same $http request - same params, etc- simultaneously in the app? Does one wait for the others' response?

And if I make them back to back. If the first one is not resolved yet, do the others wait for that?

z.a.
  • 2,549
  • 3
  • 12
  • 16

1 Answers1

0

There is a limit for browsers request count See Max parallel http connections in a browser?

Think each request independent , angularjs $http service return a promise object and you register its success and error callbacks.

Read more about from here https://docs.angularjs.org/api/ng/service/$http

See my plunk below. If I call multiple calls I see them parallel in network tab. But this doesn't cause a conflict because we have different promises and their callbacks will be different. call 1 promise instance1 ... call N promise instance N

http://plnkr.co/edit/XUboyUiAs7KFcRhUu3LP?p=preview

enter image description here

Community
  • 1
  • 1
Davut Gürbüz
  • 5,526
  • 4
  • 47
  • 83