node package manager
Orgs are free. Discover, share, and reuse code in your team. Create a free org »

connect-acceptoverride

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());