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

Function cacheKeyForRequest

scripts/studio-provider-bridge.mjs:523–533  ·  view source on GitHub ↗
(request)

Source from the content-addressed store, hash-verified

521}
522
523function cacheKeyForRequest(request) {
524 if (request.method !== "GET") {
525 return "";
526 }
527 const target = new URL(request.path, `${localUrl}/`);
528 target.searchParams.delete("simdeckToken");
529 if (target.pathname !== "/api/simulators") {
530 return "";
531 }
532 return `${target.pathname}?${target.searchParams.toString()}`;
533}
534
535export function isWebSocketUpgradeRequest(request) {
536 const headers = new Headers(request.headers || {});

Callers 1

cachedProxyResponseFunction · 0.85

Calls 2

toStringMethod · 0.80
deleteMethod · 0.65

Tested by

no test coverage detected