MCPcopy
hub / github.com/claude-code-best/claude-code / downloadUrlToBuffer

Function downloadUrlToBuffer

scripts/postinstall.cjs:164–172  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

162}
163
164async function downloadUrlToBuffer(url) {
165 const response = await fetchRelease(url)
166 if (!response.ok) {
167 throw new Error(
168 `Download failed: ${response.status} ${response.statusText}`,
169 )
170 }
171 return Buffer.from(await response.arrayBuffer())
172}
173
174async function downloadUrlToBufferWithFallback(url) {
175 let firstError

Callers 1

Calls 1

fetchReleaseFunction · 0.85

Tested by

no test coverage detected