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

Function apiHeaders

packages/client/src/api/client.ts:21–28  ·  view source on GitHub ↗
(headers: HeadersInit = {})

Source from the content-addressed store, hash-verified

19}
20
21export function apiHeaders(headers: HeadersInit = {}): HeadersInit {
22 const token = accessTokenFromLocation();
23 return {
24 "Content-Type": "application/json",
25 ...(token ? { "X-SimDeck-Token": token } : {}),
26 ...headers,
27 };
28}
29
30export async function apiRequest<T>(
31 path: string,

Callers 6

postStreamConfigFunction · 0.90
postWebRtcOfferFunction · 0.90
postTelemetryFunction · 0.90
fetchSimulatorBlobFunction · 0.90
apiRequestFunction · 0.85

Calls 1

accessTokenFromLocationFunction · 0.85

Tested by

no test coverage detected