connect-acceptoverride

Override `Accept` header if URL ends with .json or .xml

npm install connect-acceptoverride
17 downloads in the last week
51 downloads in the last month

Will change the request's Accept header to application/json if the URL ends with .json, or to application/xml if the URL ends with .xml.

Install

npm install connect-acceptoverride

Usage

var acceptOverride = require('connect-acceptoverride');
app.use(acceptOverride());
npm loves you