I am making http requests to an external API that requires every request to have an ever increasing nonce value.
The problem I am facing is that even if requests are sent in order, they do not exit the call stack in order (presumably). I am using a query library . Part of my helper method looks like this:
Api.prototype.makeRequest = function(path, args, callback) { var self = this; var nonce = null; var options = null;
The console log leads to nonce order, which never grows, but mixes up, although each request is necessarily created in order (I checked this by placing the console log before calling the request). How can I apply a specific order? Why doesn't he do that? Any insight would be greatly appreciated.
source share