MCPcopy Create free account
hub / github.com/Botloader/botloader / downloadFromUrl

Method downloadFromUrl

components/runtime/src/ts/image.ts:49–53  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

47 }
48
49 static async downloadFromUrl(url: string) {
50 const request = await HttpClient.get(url)
51 const data = await request.readAll()
52 return new Image(data.buffer)
53 }
54
55 async resize(newWidth: number, newHeight: number): Promise<Image> {
56 if (!isEncodable(this.properties.formatName)) {

Callers

nothing calls this directly

Calls 2

readAllMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected