You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
394 B
JavaScript
17 lines
394 B
JavaScript
var http = require('../../');
|
|
|
|
http.get({ path : '/doom' }, function (res) {
|
|
var div = document.getElementById('result');
|
|
if (!div.style) div.style = {};
|
|
div.style.color = 'rgb(80,80,80)';
|
|
|
|
res.on('data', function (buf) {
|
|
div.innerHTML += buf;
|
|
});
|
|
|
|
res.on('end', function () {
|
|
div.style.color = 'black';
|
|
div.innerHTML += '!';
|
|
});
|
|
});
|