Comparing version
@@ -47,3 +47,3 @@ "use strict"; | ||
encoding: Type.STRING, | ||
body: Type.OBJECT, | ||
body: Type.ARRAY, | ||
id: Type.STRING | ||
@@ -53,3 +53,3 @@ }, { | ||
this.isForwarded = false; | ||
this.body = null; | ||
this.body = []; | ||
this.isERROR = false; | ||
@@ -171,2 +171,5 @@ this.isCompressionEnabled = false; | ||
getRequestBody: function Request_getRequestBody() { | ||
if (Type.isArray(this.body) && this.body.length > 0) { | ||
return Buffer.concat(this.body); | ||
} | ||
return this.body; | ||
@@ -441,5 +444,3 @@ }, | ||
// receive body as buffer | ||
this.request.on('data', function (body) { | ||
this.body = body; | ||
}.bind(this)); | ||
this.request.on('data', this.body.push.bind(this.body)); | ||
@@ -446,0 +447,0 @@ return new Promise(this.request.on.bind(this.request, 'end')) |
@@ -5,3 +5,3 @@ { | ||
"description": "Powerful lightweight mvc framework for nodejs", | ||
"version": "0.1.0-beta-67", | ||
"version": "0.1.0-beta-68", | ||
"dependencies" : { | ||
@@ -8,0 +8,0 @@ "mongoose": "3.8.x", |
151860
0.05%4874
0.02%