MCPcopy
hub / github.com/di-sukharev/opencommit / request3

Function request3

out/cli.cjs:25344–25369  ·  view source on GitHub ↗
(input, options, callback)

Source from the content-addressed store, hash-verified

25342 var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
25343 var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol);
25344 function request3(input, options, callback) {
25345 if (isURL(input)) {
25346 input = spreadUrlObject(input);
25347 } else if (isString2(input)) {
25348 input = spreadUrlObject(parseUrl(input));
25349 } else {
25350 callback = options;
25351 options = validateUrl(input);
25352 input = { protocol };
25353 }
25354 if (isFunction4(options)) {
25355 callback = options;
25356 options = null;
25357 }
25358 options = Object.assign({
25359 maxRedirects: exports3.maxRedirects,
25360 maxBodyLength: exports3.maxBodyLength
25361 }, input, options);
25362 options.nativeProtocols = nativeProtocols;
25363 if (!isString2(options.host) && !isString2(options.hostname)) {
25364 options.hostname = "::1";
25365 }
25366 assert2.equal(options.protocol, protocol, "protocol mismatch");
25367 debug5("options", options);
25368 return new RedirectableRequest(options, callback);
25369 }
25370 function get(input, options, callback) {
25371 var wrappedRequest = wrappedProtocol.request(input, options, callback);
25372 wrappedRequest.end();

Callers

nothing calls this directly

Calls 10

isURLFunction · 0.85
spreadUrlObjectFunction · 0.85
isString2Function · 0.85
parseUrlFunction · 0.85
validateUrlFunction · 0.85
isFunction4Function · 0.85
debug5Function · 0.85
rejectFunction · 0.85
callbackFunction · 0.85
dispatchMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…