Tuesday 30 May 2017

Looping with Delay in Node JS

Apologies for this noob Node JS question, answers to this somewhat simple question would be very most appreciated!!!!!

How can I loop the below makeHttpRequest 7 times with a 1 second delay in between each call? - I've tried setTimeOut and delay but can't seem to work out the correct way of using them. Any help appreciated!!!

var post_data = that.createIRRC("AAAAAQAAAAEAAAB1Aw==");
that.makeHttpRequest(onError, onSucces, "", post_data,false)



via Jason

No comments:

Post a Comment