add closing client

This commit is contained in:
tanshanshan 2018-09-26 15:28:28 +08:00
parent 516876b232
commit 65af391e39

View File

@ -1163,6 +1163,11 @@ func executeHTTPRequest(method string, url string, body string) (string, error)
return "", err
}
resp, err := client.Do(req)
if err != nil {
return "", err
}
defer resp.Body.Close()
respBody, err := ioutil.ReadAll(resp.Body)
if err != nil {
return "", err