MCPcopy Create free account
hub / github.com/aiprodcoder/MIXAPI / DoDownloadRequest

Function DoDownloadRequest

service/cf_worker.go:45–57  ·  view source on GitHub ↗
(originUrl string)

Source from the content-addressed store, hash-verified

43}
44
45func DoDownloadRequest(originUrl string) (resp *http.Response, err error) {
46 if setting.EnableWorker() {
47 common.SysLog(fmt.Sprintf("downloading file from worker: %s", originUrl))
48 req := &WorkerRequest{
49 URL: originUrl,
50 Key: setting.WorkerValidKey,
51 }
52 return DoWorkerRequest(req)
53 } else {
54 common.SysLog(fmt.Sprintf("downloading from origin: %s", originUrl))
55 return http.Get(originUrl)
56 }
57}

Callers 3

GetImageFromUrlFunction · 0.85
DecodeUrlImageDataFunction · 0.85
GetFileBase64FromUrlFunction · 0.85

Calls 4

EnableWorkerFunction · 0.92
SysLogFunction · 0.92
DoWorkerRequestFunction · 0.85
GetMethod · 0.80

Tested by

no test coverage detected