2
0
mirror of https://github.com/tenrok/axios.git synced 2026-05-15 11:59:42 +03:00
Files
axios/examples/post/server.js
T
2025-12-30 13:30:43 +02:00

17 lines
319 B
JavaScript

export default function (req, res) {
let data = '';
req.on('data', function (chunk) {
data += chunk;
});
req.on('end', function () {
console.log('POST data received');
res.writeHead(200, {
'Content-Type': 'application/json'
});
res.write(JSON.stringify(data));
res.end();
});
};