fix(core): update
This commit is contained in:
parent
6f5d10ccd3
commit
7a3e565dbb
@ -14,11 +14,11 @@ const buildUtf8Response = (
|
|||||||
const done = plugins.smartpromise.defer<IExtendedIncomingMessage>();
|
const done = plugins.smartpromise.defer<IExtendedIncomingMessage>();
|
||||||
// Continuously update stream with data
|
// Continuously update stream with data
|
||||||
let body = '';
|
let body = '';
|
||||||
incomingMessageArg.on('data', function(chunkArg) {
|
incomingMessageArg.on('data', (chunkArg) => {
|
||||||
body += chunkArg;
|
body += chunkArg;
|
||||||
});
|
});
|
||||||
|
|
||||||
incomingMessageArg.on('end', function() {
|
incomingMessageArg.on('end', () => {
|
||||||
if (autoJsonParse) {
|
if (autoJsonParse) {
|
||||||
try {
|
try {
|
||||||
(incomingMessageArg as IExtendedIncomingMessage).body = JSON.parse(body);
|
(incomingMessageArg as IExtendedIncomingMessage).body = JSON.parse(body);
|
||||||
|
Loading…
Reference in New Issue
Block a user