|
|
|
@ -337,8 +337,8 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) { |
|
|
|
} |
|
|
|
|
|
|
|
defer func() { |
|
|
|
// Drain and close the body to let the Transport reuse the connection
|
|
|
|
io.Copy(ioutil.Discard, resp.Body) |
|
|
|
// Drain up to 512 bytes and close the body to let the Transport reuse the connection
|
|
|
|
io.CopyN(ioutil.Discard, resp.Body, 512) |
|
|
|
resp.Body.Close() |
|
|
|
}() |
|
|
|
|
|
|
|
|