Advertisement
Guest User

Untitled

a guest
Jan 30th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. var http = require('http');
  2. http.createServer(function (req, res) {
  3. res.writeHead(200, {'Content-Type': 'text/plain'});
  4.  
  5. var body = '';
  6. req.on('data', function (data) {
  7. body += data;
  8. });
  9. req.on('end', function() {
  10. console.log('body: ' + body);
  11. });
  12. res.end('');
  13.  
  14. }).listen(12345);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement