tinny-backend 1.0.4 → 1.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/Server.js +4 -0
- package/dist/core/types.d.ts +1 -0
- package/dist/utils/version.d.ts +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +1 -1
package/dist/core/Server.js
CHANGED
|
@@ -219,16 +219,20 @@ export default class Server {
|
|
|
219
219
|
});
|
|
220
220
|
this.server = http.createServer((req, res) => {
|
|
221
221
|
let body = "";
|
|
222
|
+
const rawChunks = [];
|
|
222
223
|
this.reqCount++;
|
|
223
224
|
const Req = RequestParser(req, this);
|
|
224
225
|
const Res = ResponseParser(res, Req, this);
|
|
225
226
|
req.on("data", (chunk) => {
|
|
226
227
|
body += chunk.toString();
|
|
228
|
+
rawChunks.push(chunk);
|
|
227
229
|
});
|
|
228
230
|
req.on("end", async () => {
|
|
231
|
+
Req.RawBody = Buffer.concat(rawChunks);
|
|
229
232
|
if (req.headers["content-type"] === "application/json") {
|
|
230
233
|
Req.body = body ? JSON.parse(body) : null;
|
|
231
234
|
}
|
|
235
|
+
Req.body = body;
|
|
232
236
|
body = "";
|
|
233
237
|
let handlersCount = 0;
|
|
234
238
|
for (let i = 0; i < this.methodHandler.length; i++) {
|
package/dist/core/types.d.ts
CHANGED
package/dist/utils/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "1.0.
|
|
1
|
+
export declare const VERSION = "1.0.6";
|
package/dist/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "1.0.
|
|
1
|
+
export const VERSION = "1.0.6";
|