MCPcopy Create free account
hub / github.com/andris9/fetch / FetchStream

Function FetchStream

lib/fetch.js:43–61  ·  view source on GitHub ↗
(url, options)

Source from the content-addressed store, hash-verified

41exports.fetchUrl = fetchUrl;
42
43function 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}
62utillib.inherits(FetchStream, Stream);
63
64

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected