var http = require("http"); exports.start = function () { http.createServer(function (request, response) { let body = []; request.on('data', (chunk) => { body.push(chunk); }).on('end', () => { body = Buffer.concat(body).toString(); // at this point, `body` has the entire request body stored in it as a string console.log("body is " + body); }); }).listen(37188); }