MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / fetchJson

Function fetchJson

scripts/e2e-webrtc-reliability.mjs:82–90  ·  view source on GitHub ↗
(url, init)

Source from the content-addressed store, hash-verified

80}
81
82async function fetchJson(url, init) {
83 const response = await fetch(url, init);
84 if (!response.ok) {
85 throw new Error(
86 `${url} returned ${response.status}: ${await response.text()}`,
87 );
88 }
89 return response.json();
90}
91
92async function fetchReferenceScreenshotDataUrl(udid) {
93 if (!screenshotApiRoot) {

Callers 3

waitForDevToolsFunction · 0.70

Calls 3

fetchFunction · 0.85
jsonMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected