Closed Nikos410 closed 4 years ago
Hey there, thanks for the issue.
This looks to be a duplicate of #72, which should have been fixed by #88, but it looks like we only made the 204 check in *Client.get()
and not in *Client.execute()
.
As I look at get
and execute
I spot other subtle differences as well (retry logic, error decoding, etc).
It looks like we need to make a similar if resp.StatusCode == http.StatusNoContent
check in execute
so that get
and execute
behave the same. At that point, we might as well do away with the get
helper and just use execute everywhere to avoid having to maintain such similar methods.
Hi there!
I noticed that the function
client.PlayerCurrentlyPlaying()
returns an error with the message EOF when no song is currently playing.The error occurs when trying to decode an empty response body.
I would offer to submit a PR to fix this, but this is actually the first project I'm working on using go, so I'm not sure how to approach this issue.
Thanks!