MCPcopy Index your code
hub / github.com/nodejs/node / makeRequest

Function makeRequest

deps/undici/undici.js:13005–13049  ·  view source on GitHub ↗
(init)

Source from the content-addressed store, hash-verified

13003 Reflect.deleteProperty(Request, "removeRequestAbortListener");
13004 mixinBody(Request, getRequestState);
13005 function makeRequest(init) {
13006 return {
13007 method: init.method ?? "GET",
13008 localURLsOnly: init.localURLsOnly ?? false,
13009 unsafeRequest: init.unsafeRequest ?? false,
13010 body: init.body ?? null,
13011 client: init.client ?? null,
13012 reservedClient: init.reservedClient ?? null,
13013 replacesClientId: init.replacesClientId ?? "",
13014 window: init.window ?? "client",
13015 keepalive: init.keepalive ?? false,
13016 serviceWorkers: init.serviceWorkers ?? "all",
13017 initiator: init.initiator ?? "",
13018 destination: init.destination ?? "",
13019 priority: init.priority ?? null,
13020 origin: init.origin ?? "client",
13021 policyContainer: init.policyContainer ?? "client",
13022 referrer: init.referrer ?? "client",
13023 referrerPolicy: init.referrerPolicy ?? "",
13024 mode: init.mode ?? "no-cors",
13025 useCORSPreflightFlag: init.useCORSPreflightFlag ?? false,
13026 // TODO: is this credentials mode? https://fetch.spec.whatwg.org/#concept-request-credentials-mode
13027 credentials: init.credentials ?? "same-origin",
13028 useCredentials: init.useCredentials ?? false,
13029 cache: init.cache ?? "default",
13030 redirect: init.redirect ?? "follow",
13031 integrity: init.integrity ?? "",
13032 cryptoGraphicsNonceMetadata: init.cryptoGraphicsNonceMetadata ?? "",
13033 parserMetadata: init.parserMetadata ?? "",
13034 reloadNavigation: init.reloadNavigation ?? false,
13035 historyNavigation: init.historyNavigation ?? false,
13036 userActivation: init.userActivation ?? false,
13037 taintedOrigin: init.taintedOrigin ?? false,
13038 redirectCount: init.redirectCount ?? 0,
13039 responseTainting: init.responseTainting ?? "basic",
13040 preventNoCacheCacheControlHeaderModification: init.preventNoCacheCacheControlHeaderModification ?? false,
13041 done: init.done ?? false,
13042 timingAllowFailed: init.timingAllowFailed ?? false,
13043 useURLCredentials: init.useURLCredentials ?? void 0,
13044 traversableForUserPrompts: init.traversableForUserPrompts ?? "client",
13045 urlList: init.urlList,
13046 url: init.urlList[0],
13047 headersList: init.headersList ? new HeadersList(init.headersList) : new HeadersList()
13048 };
13049 }
13050 __name(makeRequest, "makeRequest");
13051 function cloneRequest(request) {
13052 const newRequest = makeRequest({ ...request, body: null });

Callers 4

constructorMethod · 0.70
cloneRequestFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected