Skip to content
Browse files

simple get example

  • Loading branch information...
1 parent f51b5e4 commit abbf4337a37b0cd4a59de0e586012bda226a3a0b @substack committed Aug 19, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 example/get/main.js
View
3 example/get/main.js
@@ -2,12 +2,13 @@ var http = require('http');
http.get({ path : '/beep' }, function (res) {
var div = document.getElementById('result');
+ div.innerHTML += 'GET /beep<br>';
res.on('data', function (buf) {
div.innerHTML += buf;
});
res.on('end', function () {
- div.innerHTML += '!';
+ div.innerHTML += '<br>__END__';
});
});

0 comments on commit abbf433

Please sign in to comment.
Something went wrong with that request. Please try again.