I'm a newbie in node js and trying to build a simple app to build web pages from RSS feeds.
http.get('http://www.someurl.com/news?output=rss', function(res) {
res.on('data', function(chunk) {
resLength += chunk.length;
chunks.push(chunk);
});
res.on('end', function(chunk) {
// combine all chunks and process feed XML.
});
})
Processing the server response may go longer and will block the main thread.
How can I create an async operation to process the intermediate server response and send the result back?