UNPKG

@geek-fun/serverlessinsight

Version:

Full life cycle cross providers serverless application management for your fast-growing business.

17 lines (16 loc) 457 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.readRequestBody = void 0; const readRequestBody = (req) => { return new Promise((resolve, reject) => { let body = ''; req.on('data', (chunk) => { body += chunk.toString(); }); req.on('end', () => { resolve(body); }); req.on('error', reject); }); }; exports.readRequestBody = readRequestBody;