I need to send an array using an ajax call.
$.ajax({
type: "GET",
crossDomain: true,
dataType: "json",
url: "http://localhost:24234/api/SendPushNotification",
success: {
Function(result) {
Console.log(result);
}
},
data: {
'user_id': '1',
'body_param': 'body',
'title_param': 'title'
},
headers: {
'Token': 'ccTtUKQS32PjzMYQEzH2OUQN8nJpsCUXg7iWRYA7cEpAJLoNEWCKr2NcQyFUbdV4'
}
});
How could it be done?
PS: where user id goes, an "unlimited" amount of users will go according to internal filters.
As a server language VB. It is for a webservice that is responsible for sending notifications. Currently it already works by sending identifiers one by one. But it is unfeasible considering how long it takes to make the call to ws etc...
Good day, to make an ajax query you need to use the 'data' tag in the items that you are going to parameterize when making the request, it would look something like the following:
on the server side you collect the value with Request and then read the value that arrives as follows:
as it is in VB it would be to iterate with two loops as I show you below:
I hope it is useful for you. Greetings.