mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-08-25 08:08:00 +00:00
24 lines
419 B
JavaScript
24 lines
419 B
JavaScript
![]() |
'use strict';
|
||
|
|
||
|
var FetchStream = require('../lib/fetch').FetchStream;
|
||
|
|
||
|
var fetch = new FetchStream('http://google.com', {
|
||
|
headers: {}
|
||
|
});
|
||
|
|
||
|
fetch.on('data', function (chunk) {
|
||
|
console.log(chunk);
|
||
|
});
|
||
|
|
||
|
fetch.on('meta', function (meta) {
|
||
|
console.log(meta);
|
||
|
});
|
||
|
|
||
|
fetch.on('end', function () {
|
||
|
console.log('END');
|
||
|
});
|
||
|
|
||
|
fetch.on('error', function (e) {
|
||
|
console.log('ERROR: ' + (e && e.message || e));
|
||
|
});
|