(url, options)
| 41 | exports.fetchUrl = fetchUrl; |
| 42 | |
| 43 | function FetchStream(url, options){ |
| 44 | Stream.call(this); |
| 45 | |
| 46 | options = options || {}; |
| 47 | |
| 48 | this.url = url; |
| 49 | if(!this.url){ |
| 50 | return this.emit("error", new Error("url not defined")); |
| 51 | } |
| 52 | |
| 53 | this.userAgent = options.userAgent || "FetchStream"; |
| 54 | |
| 55 | this._redirect_count = 0; |
| 56 | |
| 57 | this.options = options || {}; |
| 58 | this.normalizeOptions(); |
| 59 | |
| 60 | this.runStream(url); |
| 61 | } |
| 62 | utillib.inherits(FetchStream, Stream); |
| 63 | |
| 64 |
nothing calls this directly
no outgoing calls
no test coverage detected