mirror of
https://github.com/rclone/rclone.git
synced 2025-01-13 20:38:12 +02:00
Yandex Disk: Use http.Client passed in for all operations - fixes logging.
This commit is contained in:
parent
c2e8f06bfa
commit
b1dd8e998b
@ -16,7 +16,7 @@ func (c *Client) PerformDelete(url string) error {
|
|||||||
//set access token and headers
|
//set access token and headers
|
||||||
c.setRequestScope(req)
|
c.setRequestScope(req)
|
||||||
|
|
||||||
resp, err := http.DefaultClient.Do(req)
|
resp, err := c.HTTPClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ func (c *Client) PerformDownload(url string) (out io.ReadCloser, err error) {
|
|||||||
|
|
||||||
//c.setRequestScope(req)
|
//c.setRequestScope(req)
|
||||||
|
|
||||||
resp, err := http.DefaultClient.Do(req)
|
resp, err := c.HTTPClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ func (c *Client) PerformMkdir(url string) (int, string, error) {
|
|||||||
//set access token and headers
|
//set access token and headers
|
||||||
c.setRequestScope(req)
|
c.setRequestScope(req)
|
||||||
|
|
||||||
resp, err := http.DefaultClient.Do(req)
|
resp, err := c.HTTPClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, "", err
|
return 0, "", err
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ func (c *Client) PerformUpload(url string, data io.Reader) (err error) {
|
|||||||
|
|
||||||
//c.setRequestScope(req)
|
//c.setRequestScope(req)
|
||||||
|
|
||||||
resp, err := http.DefaultClient.Do(req)
|
resp, err := c.HTTPClient.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user