I have a loop that is used to send a json object to several HTTP client:
for(var i=0; i<clients.length; i++){
request({
method: 'POST',
uri: clients[i].contact,
json: obj
},
function(err, response, body){
....
});
}
Lint tells me this "W083: Don't make functions within a loop". What is the cleanest way to do this ? On top of this, I have some concern that this approach might not be that scalable (despite the usage of nodejs), what would the the appropriate approach for a high number of clients ?