Having a really strange problem here.
I have a Restify / Node app. For debug purposes I catch 'request' and 'after' events:
server.on('request',function(req, res){
console.log('## REQUEST');
console.log('## '+req.url);
})
server.on('after',function (request, response, route, error) {
console.log('## REQUEST -- AFTER');
console.log(route);
});
Now the strange part. In an angular app I make a single call to one of the endpoints, and in the network tab of Chrome I can only see one request.
This is writen to the console:
App 14193 stdout: ## REQUEST
App 14193 stdout: ## /api/projects/5512c6bb046da5793001b70e
App 14193 stdout: ## REQUEST
App 14193 stdout: ## /api/projects/5512c6bb046da5793001b70e
So two request came in and got processed.
Now if I right click on the network line in Chrome and get the request in cURL and run it, it only gets called once (I have another debug line in the actual method that's run), but it does not trigger the 'request' or 'after' events.
I starting to go a bit crazy here :-). Does anyone have any idea of what might be going on?