MCPcopy Create free account
hub / github.com/angular/dev-infra / mainFetch

Function mainFetch

github-actions/bazel/configure-remote/configure-remote.js:14082–14180  ·  view source on GitHub ↗
(fetchParams, recursive = false)

Source from the content-addressed store, hash-verified

14080 function fetching({
14081 request,
14082 processRequestBodyChunkLength,
14083 processRequestEndOfBody,
14084 processResponse,
14085 processResponseEndOfBody,
14086 processResponseConsumeBody,
14087 useParallelQueue = false,
14088 dispatcher = getGlobalDispatcher()
14089 // undici
14090 }) {
14091 var _a, _b, _c;
14092 assert(dispatcher);
14093 let taskDestination = null;
14094 let crossOriginIsolatedCapability = false;
14095 if (request.client != null) {
14096 taskDestination = request.client.globalObject;
14097 crossOriginIsolatedCapability = request.client.crossOriginIsolatedCapability;
14098 }
14099 const currentTime = coarsenedSharedCurrentTime(crossOriginIsolatedCapability);
14100 const timingInfo = createOpaqueTimingInfo({
14101 startTime: currentTime
14102 });
14103 const fetchParams = {
14104 controller: new Fetch(dispatcher),
14105 request,
14106 timingInfo,
14107 processRequestBodyChunkLength,
14108 processRequestEndOfBody,
14109 processResponse,
14110 processResponseConsumeBody,
14111 processResponseEndOfBody,
14112 taskDestination,
14113 crossOriginIsolatedCapability
14114 };
14115 assert(!request.body || request.body.stream);
14116 if (request.window === "client") {
14117 request.window = ((_c = (_b = (_a = request.client) == null ? void 0 : _a.globalObject) == null ? void 0 : _b.constructor) == null ? void 0 : _c.name) === "Window" ? request.client : "no-window";
14118 }
14119 if (request.origin === "client") {
14120 request.origin = request.client.origin;
14121 }
14122 if (request.policyContainer === "client") {
14123 if (request.client != null) {
14124 request.policyContainer = clonePolicyContainer(
14125 request.client.policyContainer
14126 );
14127 } else {
14128 request.policyContainer = makePolicyContainer();
14129 }
14130 }
14131 if (!request.headersList.contains("accept", true)) {
14132 const value = "*/*";
14133 request.headersList.append("accept", value, true);
14134 }
14135 if (!request.headersList.contains("accept-language", true)) {
14136 request.headersList.append("accept-language", "*", true);
14137 }
14138 if (request.priority === null) {
14139 }

Callers 2

fetchingFunction · 0.70
httpRedirectFetchFunction · 0.70

Calls 15

__asyncFunction · 0.70
urlIsLocalFunction · 0.70
requestCurrentURLFunction · 0.70
makeNetworkErrorFunction · 0.70
requestBadPortFunction · 0.70
sameOriginFunction · 0.70
schemeFetchFunction · 0.70
urlIsHttpHttpsSchemeFunction · 0.70
httpFetchFunction · 0.70
filterResponseFunction · 0.70

Tested by

no test coverage detected