mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 04:04:46 +08:00
lib/rest: Add Client.Do function to call http.Client.Do
This commit is contained in:
parent
09cc8179cc
commit
48262849df
|
@ -211,6 +211,11 @@ func ClientWithNoRedirects(c *http.Client) *http.Client {
|
|||
return &clientCopy
|
||||
}
|
||||
|
||||
// Do calls the internal http.Client.Do method
|
||||
func (api *Client) Do(req *http.Request) (*http.Response, error) {
|
||||
return api.c.Do(req)
|
||||
}
|
||||
|
||||
// Call makes the call and returns the http.Response
|
||||
//
|
||||
// if err == nil then resp.Body will need to be closed unless
|
||||
|
|
Loading…
Reference in New Issue
Block a user