Commit 3b599779 authored by Kamron Aroonrua's avatar Kamron Aroonrua 💬

http mime

parent 90cca94c
...@@ -48,13 +48,13 @@ HTTPListener.prototype._http_start = function() ...@@ -48,13 +48,13 @@ HTTPListener.prototype._http_start = function()
} }
}); });
app.use(bodyParser.json({limit: '128mb'})); app.use(bodyParser.json({limit: '128mb',type:"*/json"}));
app.use(bodyParser.urlencoded({ app.use(bodyParser.urlencoded({
extended: true, extended: true,
limit: '128mb' limit: '128mb'
})); }));
app.use(bodyParser.raw({limit: '128mb'}));
app.use(bodyParser.text({limit: '128mb',type:"text/*"})); app.use(bodyParser.text({limit: '128mb',type:"text/*"}));
app.use(bodyParser.raw({limit: '128mb',type:"*/*"}));
var context = require('./lib/http-context'); var context = require('./lib/http-context');
app.use(context.middleware({ app.use(context.middleware({
......
...@@ -28,7 +28,7 @@ var process_req = function(req, res ,method) { ...@@ -28,7 +28,7 @@ var process_req = function(req, res ,method) {
j.forEach(function(item){ j.forEach(function(item){
var httpdata = { var httpdata = {
'object_type' : 'httpdata', 'object_type' : 'httpdata',
'headers':req.headers, 'headers': req.headers,
'method' : method, 'method' : method,
'data' : {} 'data' : {}
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment