Use res.Body check instead of res.ContentLength

This commit is contained in:
Reverite 2019-04-29 13:18:17 -07:00
parent 4fb520ebac
commit f9a6d11d38
1 changed files with 1 additions and 1 deletions

View File

@ -241,7 +241,7 @@ func (cli *Client) MakeRequest(method string, httpURL string, reqBody interface{
} }
} }
if res.ContentLength > 0 { if res.Body != nil {
return json.NewDecoder(res.Body).Decode(&resBody) return json.NewDecoder(res.Body).Decode(&resBody)
} }