dump request
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Timo Hocker 2020-08-22 12:41:47 +02:00
parent 8a36273325
commit f46e61e1a3
2 changed files with 8 additions and 0 deletions

7
lib/api/dump.js Normal file
View File

@ -0,0 +1,7 @@
module.exports = (req,res,next) => {
console.log(req.method, req.originalUrl);
console.log(JSON.stringify(req.headers));
console.log('');
console.log(JSON.stringify(req.body, null, 2));
next();
};

View File

@ -10,6 +10,7 @@
const router = require ('express')
.Router ();
router.use(require('./dump'));
router.get ('/log', require ('./get-log'));
router.get ('/app', require ('./get-app'));