Skip to content

Override `Accept` to `application/json` header if URL ends with .json (Connect/Express middleware)

Notifications You must be signed in to change notification settings

olalonde/connect-acceptoverride

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Override `Accept` to `application/json` header if URL ends with .json (Connect/Express middleware)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published