Configurable encoding. #126

This commit is contained in:
Michael Teeuw
2016-04-05 13:16:23 +02:00
parent 1a20bd2f4d
commit 06efd01032
5 changed files with 24 additions and 8 deletions

View File

@@ -14,7 +14,7 @@ var NewsFetcher = require('./newsfetcher.js');
* attribute reloadInterval number - Reload interval in milliseconds.
*/
var Fetcher = function(url, reloadInterval) {
var Fetcher = function(url, reloadInterval, encoding) {
var self = this;
var newsFetcher = new NewsFetcher();
if (reloadInterval < 1000) {
@@ -44,7 +44,7 @@ var Fetcher = function(url, reloadInterval) {
}, function(error) {
fetchFailedCallback(self, error);
scheduleTimer();
});
}, encoding);
};
/* scheduleTimer()