Skip to content
Override `Accept` to `application/json` header if URL ends with .json (Connect/Express middleware)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
test
.gitignore
Makefile
README.md
index.js
package.json

README.md

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());
You can’t perform that action at this time.