Url AJAX variables

0

Sorry I have a question about how I can send the same variables to two different URLs in an ajax

    
asked by JV93 29.11.2018 в 20:45
source

1 answer

1

You could go through an array using the $ .each function

var url = ['miurl1','miurl2', ....];

$.each(url, function( index, value ) {
  $.ajax({
        url: value,
        type: "POST",
        data: {
         },
         success: function (data) {
           console.log(data);
         }
});
});

I consider that this should work without problems, at the same time you could not do it, it should always be done by different calls, since ajax can only make a call.

Greetings.

    
answered by 29.11.2018 в 21:05