|
|
|
@@ -89,7 +89,15 @@ func getDirs(uuid string, parentDir string) (string,error) { |
|
|
|
req = "uuid=" + uuid + "&parentDir=" + parentDir |
|
|
|
} |
|
|
|
|
|
|
|
res, err := http.Get(setting.DecompressAddress + "/dirs?" + req) |
|
|
|
url := setting.DecompressAddress + "/dirs?" + req |
|
|
|
reqHttp, err := http.NewRequest(http.MethodGet, url, nil) |
|
|
|
if err != nil { |
|
|
|
log.Error("http.NewRequest failed:", err.Error()) |
|
|
|
return dirs, err |
|
|
|
} |
|
|
|
|
|
|
|
reqHttp.SetBasicAuth(setting.AuthUser, setting.AuthPassword) |
|
|
|
res, err := http.DefaultClient.Do(reqHttp) |
|
|
|
if err != nil { |
|
|
|
log.Error("send http to decompress failed:", err.Error()) |
|
|
|
return dirs, err |
|
|
|
|