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

jsonrpc field missing from request #2

Closed
ecksun opened this issue Oct 25, 2015 · 2 comments
Closed

jsonrpc field missing from request #2

ecksun opened this issue Oct 25, 2015 · 2 comments

Comments

@ecksun
Copy link
Contributor

ecksun commented Oct 25, 2015

I'm doing my first project in rust and when trying to use this library I noticed that the jsonrpc field is missing from the request, using wireshark:

POST /jsonrpc HTTP/1.1
Host: some.host
Content-Length: 55

{"method":"Player.GetActivePlayers","params":[],"id":1}

A proper jsonrpc 2.0 message MUST include the jsonrpc field (and have a value of "2.0") according to http://www.jsonrpc.org/specification

That is, the proper request should be:

{"jsonrpc":"2.0","method":"Player.GetActivePlayers","params":[],"id":1}

I haven't figured out enough of rust/cargo to submit a patch yet though.

@apoelstra
Copy link
Owner

Fixed by #3

@ecksun
Copy link
Contributor Author

ecksun commented Nov 1, 2015

Alright, I just realized fixing the response. I have been up and down serde trying to figure out why it couldn't parse the response, and its obviously because the Response object doesn't have the jsonrpc field either.

I will hopefully soon submit a patch which addresses that as well.

danielost pushed a commit to danielost/rust-jsonrpc that referenced this issue May 22, 2024
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