MCPcopy Index your code
hub / github.com/callstack/agent-device / readJsonRpcId

Function readJsonRpcId

src/remote/daemon-proxy.ts:379–387  ·  view source on GitHub ↗
(body: string | undefined)

Source from the content-addressed store, hash-verified

377}
378
379function readJsonRpcId(body: string | undefined): unknown {
380 if (!body) return null;
381 try {
382 const parsed = JSON.parse(body) as { id?: unknown };
383 return parsed.id ?? null;
384 } catch {
385 return null;
386 }
387}
388
389function resolveRequestId(req: IncomingMessage): string {
390 const header = req.headers['x-request-id'];

Callers 1

handleProxyRequestFunction · 0.85

Calls 1

parseMethod · 0.45

Tested by

no test coverage detected