Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Override `Accept` to `application/json` header if URL ends with .json (Connect/Express middleware)
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this 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());
Something went wrong with that request. Please try again.