19 lines
506 B
JavaScript
19 lines
506 B
JavaScript
|
'use strict';
|
||
|
|
||
|
module.exports.create = function (opts) {
|
||
|
var bodyParser = require('body-parser');
|
||
|
var jsonParser = bodyParser.json({
|
||
|
inflate: true, limit: '100kb', reviver: null, strict: true /* type, verify */
|
||
|
});
|
||
|
|
||
|
return function (req, res) {
|
||
|
jsonParser(req, res, function () {
|
||
|
|
||
|
console.log('req.body', req.body);
|
||
|
|
||
|
res.setHeader('Content-Type', 'application/json;');
|
||
|
res.end(JSON.stringify({ error: { message: "Not Implemented", code: "E_NO_IMPL" } }));
|
||
|
});
|
||
|
};
|
||
|
};
|