diff --git a/basic/server.js b/basic/server.js index 59989a9..f325630 100644 --- a/basic/server.js +++ b/basic/server.js @@ -14,6 +14,10 @@ const app = express(); app.use(bodyParser.urlencoded({extended: true})); app.use(bodyParser.json()); app.use(methodOverride('X-HTTP-Method-Override')); +app.use((req, res, next) => { + res.setHeader('Content-Type', req.headers['content-type']); + next(); +}); // Add Basic authentication to our API. app.use((req, res, next) => { @@ -45,4 +49,9 @@ app.delete('/*', (req, res, next) => { next(); }); +// Add basic response +app.use((req, res) => { + res.send({}); +}); + module.exports = app;