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

Function localGet

scripts/studio-host-provider.mjs:582–594  ·  view source on GitHub ↗
(config, path)

Source from the content-addressed store, hash-verified

580}
581
582async function localGet(config, path) {
583 const target = new URL(path, `${config.localUrl}/`);
584 target.searchParams.set("simdeckToken", config.localToken);
585 const response = await fetch(target, {
586 headers: { "x-simdeck-token": config.localToken },
587 });
588 if (!response.ok) {
589 throw new Error(
590 `Local SimDeck GET ${path} failed: HTTP ${response.status}`,
591 );
592 }
593 return response.json();
594}
595
596async function localJson(config, path, body) {
597 const target = new URL(path, `${config.localUrl}/`);

Callers 2

localProviderMetadataFunction · 0.85
simulatorByUdidFunction · 0.85

Calls 3

fetchFunction · 0.85
setMethod · 0.80
jsonMethod · 0.80

Tested by

no test coverage detected