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.
15 lines
332 B
JavaScript
15 lines
332 B
JavaScript
7 years ago
|
var http = require('../../');
|
||
|
|
||
|
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 += '<br>__END__';
|
||
|
});
|
||
|
});
|