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
2015-04-08 13:24:43 -06:00

17 lines
318 B
JavaScript

module.exports = function (req, res) {
var 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();
});
};