I need to make 2 http request - the response of the first one will be used in the second. The way I do the request is using the http.get(url, callback)
method from the http module. But I assume nodejs spawns another thread for the second http request and responses arrive asynchronously. What I did is it to put the second http request in the callback of the first, it works, but looks like unmaintainable code to me.
Any other ways to do it?