(req, res)
| 69 | |
| 70 | //获取POST请求内容、cookie |
| 71 | function toPost(req, res) { |
| 72 | const bodyChunks = [] |
| 73 | req.on('data', function (chunk) { |
| 74 | bodyChunks.push(chunk) |
| 75 | }).on('end', async () => { |
| 76 | const completeBodyBuffer = Buffer.concat(bodyChunks); |
| 77 | await GenerateCharts(JSON.parse(completeBodyBuffer.toString('utf8'))) |
| 78 | res.end('complete'); |
| 79 | }); |
| 80 | } |