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

Function requestForFetchReport

packages/server-e2e/src/report.ts:609–618  ·  view source on GitHub ↗
(
  input: Parameters<typeof fetch>[0],
  init: Parameters<typeof fetch>[1],
)

Source from the content-addressed store, hash-verified

607}
608
609function requestForFetchReport(
610 input: Parameters<typeof fetch>[0],
611 init: Parameters<typeof fetch>[1],
612): { body?: unknown } {
613 if (init?.body !== undefined && init.body !== null) {
614 return { body: parseBodyForReport(init.body) };
615 }
616 if (input instanceof Request) return {};
617 return {};
618}
619
620function parseBodyForReport(body: NonNullable<RequestInit['body']>): unknown {
621 if (typeof body === 'string') {

Callers 1

fetchWithReportFunction · 0.85

Calls 1

parseBodyForReportFunction · 0.85

Tested by

no test coverage detected