-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SendMessageCommand should be using FromBody #5628
SendMessageCommand should be using FromBody #5628
Comments
incorrectly sending parameters in body, rather than sending them in query string as required by the SessionController API on the server. Resolves: #173
I raised this internally with the server team after seeing this issue, but in my opinion we should keep them as part of the POST body and adjust the server so it can get the parameters from both the body and the query (for back-compatibility). It doesn't make much sense to POST to an endpoint with a query string rather than a body, especially with a message of varying length, which is bound to cause issues since URLs have a limited length. |
I originally created the pull request for the javascript side because the server and kotlin api seemed to agree with each other and tried to fix it with the smallest change necessary. |
Just as a heads up, the Kotlin sdk is auto-generated, so changes aren't required there. |
Ahh, thanks, that would explain why they match. Just about done with the API change. There's a few unrelated minor edge case bugs in the SessionController I've noticed, is that something I should submit a separate pull request for, or would lumping them in with this be acceptable? |
implementation receive data in the POST body, as that is how the jellyfin-web client currently posts the data to the server. Resolves: jellyfin#5628
My normal workflow is in GitLab or Azure DevOps. If I need to add anything to these pull requests, or if I've forgotten something, please let me know. |
These pull requests should resolve the issue for the API and all clients that implement that call to the APIs |
implementation receive data in the POST body, as that is how the jellyfin-web client currently posts the data to the server. Resolves: jellyfin#5628
All parameters for the API Endpoint are marked as [FromQuery] as of 3/26/2021
Permalink to current SessionController implementation:
jellyfin/Jellyfin.Api/Controllers/SessionController.cs
Line 312 in 6946e58
The current implementation of sendMessageCommand in apiClient.js is passing the options in the POST body, rather than sending the parameters as query string parameters.
Note: I have a commit to resolve this issue, which I will include in a pull request to resolve this.
The text was updated successfully, but these errors were encountered: