1
0
Fork 0
mirror of https://github.com/matrix-org/gomatrix synced 2025-05-15 20:13:22 +00:00

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

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)
}