mirror of https://github.com/lukechilds/node.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
341 B
21 lines
341 B
15 years ago
|
/*
|
||
|
* try with
|
||
|
* curl -d @/usr/share/dict/words http://localhost:8000/123
|
||
|
*/
|
||
|
|
||
|
http = require('http');
|
||
|
|
||
|
s = http.Server(function (req, res) {
|
||
|
console.log(req.headers);
|
||
|
|
||
|
req.pipe(process.stdout, { end: false });
|
||
|
|
||
|
req.on('end', function () {
|
||
|
res.writeHead(200);
|
||
|
res.write("thanks");
|
||
|
res.end();
|
||
|
});
|
||
|
});
|
||
|
|
||
|
s.listen(8000);
|