Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,11 @@ exports.buildExpress = function(options) {
res.end();
});
});

if (req.body) {
console.log('writing body: ' + JSON.stringify(req.body));
mlReq.write(JSON.stringify(req.body));
}

req.pipe(mlReq);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure the mlReq.write is needed? Line 100 has req.pipe(mlReq) which should essentially pass the body through unchanged. Then again, perhaps there is some json parsing going on that messes things up.

Keep in mind demo-cat has been running for a long while, and we have not observed this so far..

req.on('end', function() {
Expand Down