MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / resolveRequestId

Function resolveRequestId

packages/server/src/request-id.ts:15–21  ·  view source on GitHub ↗
(
  headers: Record<string, string | string[] | undefined>,
)

Source from the content-addressed store, hash-verified

13const REQUEST_ID_HEADER = 'x-request-id';
14
15export function resolveRequestId(
16 headers: Record<string, string | string[] | undefined>,
17): string {
18 const raw = headers[REQUEST_ID_HEADER];
19 const supplied = Array.isArray(raw) ? raw[0] : raw;
20 return parseOrGenerateRequestId(supplied);
21}

Callers 2

buildAppFunction · 0.90
startServerFunction · 0.90

Calls 1

parseOrGenerateRequestIdFunction · 0.90

Tested by 1

buildAppFunction · 0.72