Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

Yandex Disk: Use http.Client passed in for all operations - fixes logging.

Nick Craig-Woodb1dd8e998b62
diff --git a/yandex/api/performdelete.go b/yandex/api/performdelete.go
index 5aa0b616b..c0e4059c8 100644
--- a/yandex/api/performdelete.go
+++ b/yandex/api/performdelete.go
@@ -16,7 +16,7 @@ func (c *Client) PerformDelete(url string) error {
//set access token and headers
c.setRequestScope(req)
- resp, err := http.DefaultClient.Do(req)
+ resp, err := c.HTTPClient.Do(req)
if err != nil {
return err
}
diff --git a/yandex/api/performdownload.go b/yandex/api/performdownload.go
index 5d4100c7f..3513baa26 100644
--- a/yandex/api/performdownload.go
+++ b/yandex/api/performdownload.go
@@ -16,7 +16,7 @@ func (c *Client) PerformDownload(url string) (out io.ReadCloser, err error) {
//c.setRequestScope(req)
- resp, err := http.DefaultClient.Do(req)
+ resp, err := c.HTTPClient.Do(req)
if err != nil {
return nil, err
}
diff --git a/yandex/api/performmkdir.go b/yandex/api/performmkdir.go
index 3a6f85b25..1deabb7fe 100644
--- a/yandex/api/performmkdir.go
+++ b/yandex/api/performmkdir.go
@@ -16,7 +16,7 @@ func (c *Client) PerformMkdir(url string) (int, string, error) {
//set access token and headers
c.setRequestScope(req)
- resp, err := http.DefaultClient.Do(req)
+ resp, err := c.HTTPClient.Do(req)
if err != nil {
return 0, "", err
}
diff --git a/yandex/api/performupload.go b/yandex/api/performupload.go
index 2941e7a17..0ffb0aae9 100644
--- a/yandex/api/performupload.go
+++ b/yandex/api/performupload.go
@@ -18,7 +18,7 @@ func (c *Client) PerformUpload(url string, data io.Reader) (err error) {
//c.setRequestScope(req)
- resp, err := http.DefaultClient.Do(req)
+ resp, err := c.HTTPClient.Do(req)
if err != nil {
return err
}