MCPcopy
hub / github.com/21st-dev/magic-mcp / fetchSVGContent

Method fetchSVGContent

src/tools/logo-search.ts:83–94  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

81 }
82
83 private async fetchSVGContent(url: string): Promise<string> {
84 try {
85 const response = await fetch(url);
86 if (!response.ok) {
87 throw new Error(`Failed to fetch SVG content: ${response.statusText}`);
88 }
89 return await response.text();
90 } catch (error) {
91 console.error("Error fetching SVG content:", error);
92 throw error;
93 }
94 }
95
96 private async convertToFormat(
97 svgContent: string,

Callers 1

executeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected