MCPcopy Index your code
hub / github.com/totaljs/framework / parseProxy

Function parseProxy

utils.js:510–525  ·  view source on GitHub ↗
(p)

Source from the content-addressed store, hash-verified

508}
509
510function parseProxy(p) {
511 var key = 'proxy_' + p;
512 if (F.temporary.other[key])
513 return F.temporary.other[key];
514
515 if (p.indexOf('://') === -1)
516 p = 'http://' + p;
517
518 var obj = Url.parse(p);
519
520 if (obj.auth)
521 obj._auth = 'Basic ' + Buffer.from(obj.auth).toString('base64');
522
523 obj.port = +obj.port;
524 return F.temporary.other[key] = obj;
525}
526
527/**
528 * Create a request to a specific URL

Callers 1

utils.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected