MCPcopy
hub / github.com/ampproject/amphtml / fetch

Function fetch

src/preact/utils/xhr.js:20–26  ·  view source on GitHub ↗

* Wrapper around `fetch` that checks the status code * * @param {RequestInfo} url * @param {RequestInit} [init] * @return {Promise }

(url, init)

Source from the content-addressed store, hash-verified

18 * @return {Promise<Response>}
19 */
20 async fetch(url, init) {
21 const response = await self.fetch(url, init);
22 if (!response.ok) {
23 throw new Error(response.statusText);
24 }
25 return response;
26 },
27};

Callers 15

createIncidentFunction · 0.85
getIncidentFunction · 0.85
updateIncidentFunction · 0.85
addCommentFunction · 0.85
checkFileFunction · 0.85
fetchAmpSw_Function · 0.85
postJsonFunction · 0.85
skipBundleSizeFunction · 0.85
githubFetchFunction · 0.85
reportCoverageFunction · 0.85
passthroughServeModeCdnFunction · 0.85
requestAmphtmlDocUrlFunction · 0.85

Calls 1

fetchMethod · 0.45

Tested by

no test coverage detected