MCPcopy Index your code
hub / github.com/angular/angular / makeRequest

Function makeRequest

packages/service-worker/worker/test/happy_spec.ts:2877–2890  ·  view source on GitHub ↗
(
  scope: SwTestHarness,
  url: string,
  clientId = 'default',
  init?: Object,
)

Source from the content-addressed store, hash-verified

2875}
2876
2877async function makeRequest(
2878 scope: SwTestHarness,
2879 url: string,
2880 clientId = 'default',
2881 init?: Object,
2882): Promise<string | null> {
2883 const [resPromise, done] = scope.handleFetch(new MockRequest(url, init), clientId);
2884 await done;
2885 const res = await resPromise;
2886 if (res !== undefined && res.ok) {
2887 return res.text();
2888 }
2889 return null;
2890}
2891
2892async function makeWorkerRequest(
2893 scope: SwTestHarness,

Callers 5

happy_spec.tsFile · 0.70
initializeSwForFunction · 0.70
requestFunction · 0.70
requestFooFunction · 0.70
makeNavigationRequestFunction · 0.70

Calls 2

textMethod · 0.65
handleFetchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…