MCPcopy Create free account
hub / github.com/idosal/git-mcp / fetchFile

Function fetchFile

src/api/utils/helpers.ts:83–90  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

81
82// Helper: fetch a file from a URL.
83export async function fetchFile(url: string): Promise<string | null> {
84 try {
85 const response = await fetch(url);
86 return response.ok ? await response.text() : null;
87 } catch {
88 return null;
89 }
90}

Callers

nothing calls this directly

Calls 2

fetchFunction · 0.85
textMethod · 0.65

Tested by

no test coverage detected