MCPcopy Create free account
hub / github.com/OpenDCAI/Paper2Any / apiFetch

Function apiFetch

frontend-workflow/src/config/api.ts:49–60  ·  view source on GitHub ↗
(
  url: string,
  options: RequestInit = {}
)

Source from the content-addressed store, hash-verified

47 * @returns Fetch response
48 */
49export async function apiFetch(
50 url: string,
51 options: RequestInit = {}
52): Promise<Response> {
53 const { getBackendHeaders } = await import('../services/backendClient');
54 const headers = await getBackendHeaders(options.headers);
55
56 return fetch(url, {
57 ...options,
58 headers,
59 });
60}

Callers 5

handleSendMessageFunction · 0.90
onSearchAuthorFunction · 0.90
onLoadAuthorDetailFunction · 0.90
onLoadPaperDetailFunction · 0.90
onLoadPaperContextFunction · 0.90

Calls 1

getBackendHeadersFunction · 0.85

Tested by

no test coverage detected