Hi!
I have an array with data and want to send a request if the value suits me. It is not possible to send several values at once, only one is triggered. Help, please!
Code:
for (var i = 0; i < contractors_spec.length; i++)
{
if (contractors_spec[i].indexOf(product) != -1)
{
url_get = url + "?respath=" + contractors_path[i] + "&order_id=" + order_id + "&product=" + article + "&count=" + count + "&adress=" + adress + "&time=" + time + "&contractor_id=" + contractors_id[i] + "&contractor_name=" + contractors_name[i] + "&order_path=" + order_path;
url_get = encodeURI(url_get);
var opts = {
method: 'GET',
url: url_get
};
utils.request(opts, function(err, resp, body) {
if(err) {
return reject(err);
}
resolve(body);
});
}
}