MCPcopy Index your code
hub / github.com/LumaAI-API/Luma-API / getImageFromUrl

Function getImageFromUrl

luma.go:248–259  ·  view source on GitHub ↗
(url string)

Source from the content-addressed store, hash-verified

246}
247
248func getImageFromUrl(url string) (data io.Reader, err error) {
249 resp, err := http.Get(url)
250 if err != nil {
251 return
252 }
253 defer resp.Body.Close()
254 dataBytes, err := io.ReadAll(resp.Body)
255 if err != nil {
256 return
257 }
258 return bytes.NewReader(dataBytes), nil
259}
260
261func getMe() (map[string]any, error) {
262 resp, err := DoRequest(http.MethodGet, common.BaseUrl+UserinfoEndpoint, nil, nil)

Callers 1

readImageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected