mirror of
https://github.com/axios/axios.git
synced 2026-04-12 02:31:57 +08:00
17 lines
319 B
JavaScript
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();
|
|
});
|
|
};
|