I have a simple code that gives a JSON response for a specific route. Here\'s my current code:
var express = require(\'express\') , async = require(\'async
As an update to this, it looks like res.type should be used instead as res.set does not give the same results.
res.type('application/xml');
More information can be found in the API reference.