Fix malformed HTTP version for HomeKit source #620

This commit is contained in:
Alexey Khit
2023-09-10 16:08:06 +03:00
parent 8f98fc4547
commit 863f8ec19b
+3 -1
View File
@@ -296,11 +296,13 @@ func (c *Client) PutCharacters(characters ...*Character) error {
return err
}
_, err = c.Put(PathCharacteristics, MimeJSON, bytes.NewReader(body))
res, err := c.Put(PathCharacteristics, MimeJSON, bytes.NewReader(body))
if err != nil {
return err
}
_, _ = io.ReadAll(res.Body) // important to "clear" body
return nil
}