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:
parent
4fb520ebac
commit
f9a6d11d38
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue