Closed helloanoop closed 8 years ago
Changes look good... but would like to discuss making maxListeners and maxRedirects configurable.
What about the code below? Will allow us to override these settings on demand without changing method signatures.
` // add defaults object in file header of lib/cms/index.js var defaults = { maxRedirects: 10, maxListeners: require('events').EventEmitter.prototype._maxListeners };
// inside get promise function ops.maxRedirects = ops.maxRedirects || defaults.maxRedirects; require('events').EventEmitter.prototype._maxListeners = ops.maxRedirects || defaults.maxListeners; `
See https://jsfiddle.net/nesbert/5rpyscnf/
Usage...
Cms.defaults.maxRedirects = 2;
var report = new Cms(serviceUrl, serviceNamespace, serviceUsername, servicePassword);
`
Good stuff cutting a release now.
Please see ticket comments for further details