Closed adamkoch closed 3 months ago
I used Flutter DevTools to inspect the network requests and it appears all fine. It's sending a simple PUT request to:
https://api.spotify.com/v1/me/player/play?
Comparing to the sample request in the Spotify docs it looks the same AFAICT. I kept the request body empty for both of them.
@adamkoch So far there are no debug tools in this library. However, this is a good idea. I'll create another issue for this.
To follow up, I found the issue was that:
.player.startOrResume()
Adds an empty request body of "". Which Spotify considers a malformed request which is why it's not working. I looked over the code but couldn't find where to have it return an empty body when there are no parameters supplied. If you have any code pointers please let me know.
Perhaps here, default is to set body to empty string vs null: https://github.com/rinukkusu/spotify-dart/blob/v0.11.0/lib/src/spotify_base.dart#L167
Fix is released with v0.13.4!
When I call
startOrResume()
I am getting error 400:Is there a way to turn on debug logging so I can see the actual http requests being sent out and see what the issue is with the request?
Additional info: