Skip to content

Commit

Permalink
fix: fail to download(cow)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikubill committed Apr 30, 2020
1 parent 4aca6a8 commit cb5eeef
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apis/public/cowtransfer/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,13 @@ func (b cowTransfer) initDownload(v string, config apis.DownConfig) error {
}
fmt.Printf("Remote: %s\n", v)
detailsURL := fmt.Sprintf(downloadDetails, fileID, b.Config.passCode)
resp, err := http.Get(detailsURL)

req, err := http.NewRequest("GET", detailsURL, nil)
if err != nil {
return fmt.Errorf("createRequest returns error: %s", err)
}
addHeaders(req)
resp, err := http.DefaultClient.Do(req)
if err != nil {
return fmt.Errorf("getDownloadDetails returns error: %s", err)
}
Expand Down

0 comments on commit cb5eeef

Please sign in to comment.