mirror of
https://github.com/axios/axios.git
synced 2026-04-12 14:41:55 +08:00
* fix: removing multiple/trailing/leading whitespaces * Reverting changes in the dist directory Co-authored-by: Jay <jasonsaayman@gmail.com>
17 lines
314 B
JavaScript
17 lines
314 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': 'text/json'
|
|
});
|
|
res.write(JSON.stringify(data));
|
|
res.end();
|
|
});
|
|
};
|