Replies: 1 comment 1 reply
-
|
So is there no issue here then? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In the app I've been working on, getting a list of artists in the library (without a specific search criteria) via REST works fine
For example, this works fine and lists the 6 first artists in name order
curl -v -X POST http://MY_MASS_IP:8095/api -H "Authorization: Bearer MY_TOKEN" -H "Content-Type: application/json" -d "{ \"command\": \"music/artists/library_items\", \"args\": {"search":"","limit":"6","order_by":"sort_name","offset":"0"} }"However, if I issue the same command via websocket (after auth), I get back a blank result
{"command":"music/artists/library_items","args":{"search":"","limit":6,"order_by":"sort_name","offset":0},"message_id":5}This simply returns
{ }If I add a parameter in the search arg, say "search":"a", I do get artists (while throwing in a bad argument gets me an error return) so I am assuming my syntax is still correct. I've also tested with removing the "search" arg entirely which similarly returns no result.
Is this a bug in the WebSocket API or is there something I need to do differently here compared to when using an api POST request?
Edit: This turned out to be a client-side parsing/memory issue where the WebSocket return used juuust enough more memory than the HTTPAPI that things broke in weird ways. TCPDump showed MASS returning the expected data for both HTTP POST and WebSocket
Beta Was this translation helpful? Give feedback.
All reactions