Skip to content
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

Single response when sending batch request. #140

Open
hovi opened this issue Nov 3, 2022 · 2 comments
Open

Single response when sending batch request. #140

hovi opened this issue Nov 3, 2022 · 2 comments

Comments

@hovi
Copy link

hovi commented Nov 3, 2022

When I send multiple request in batch array, I get correctly results. When I send single request, I get the result without array brackets. The specification is a bit confusing, but I expect this is incorrect. It is certainly breaking my client expectations :-D Some examples follow.

Correct with 2 requests:

Request

[{"id":1849316922322121888,"jsonrpc":"2.0","method":"Observer.SwitchCamera","params":{}},{"id":732138300415643188,"jsonrpc":"2.0","method":"Observer.SwitchCamera","params":{}}]

Response
[{"jsonrpc":"2.0","result":null,"id":1849316922322121888},{"jsonrpc":"2.0","result":null,"id":732138300415643188}]



Request
[{"id":2419378167359262235,"jsonrpc":"2.0","method":"Observer.SwitchCamera","params":{}}]

Response missing array brackets
{"jsonrpc":"2.0","result":null,"id":2419378167359262235}


@Astn
Copy link
Owner

Astn commented Mar 13, 2024

Ahh, good find. Did you already make a fix?

@hovi
Copy link
Author

hovi commented Mar 19, 2024

Nah sorry, I don't have .NET setup anymore and did workaround on my client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants