Comments (5)
I'm not sure I understand what issue this is causing? AFAIK the purpose of the request id is when you are multiplexing multiple requests over a single connection, in order to identify which request a response corresponds to.
from jsonrpc2-elixir.
Yes, the ID is used for multiplexing (and primarily so), however, it's purpose is not defined in the specification as such. I agree that for single http calls it doesn't make too much sense, however, the library assumes that the client doesn't need to pass a custom id. It would be nice to be able optionally pass it.
from jsonrpc2-elixir.
The purpose is defined in the spec, as far as I can tell:
The Server MUST reply with the same value in the Response object if included. This member is used to correlate the context between the two objects.
If you want to add a PR to add an optional argument to change the request ID from 0 to another value, I would welcome it, but it will also have to validate that the passed value is a valid request ID.
from jsonrpc2-elixir.
+1 here. I'm experiencing issues with hardcoded id too, the problem is tendermint rpc server doesn't accept integer id value (yes, it's Tendermint's fault but still my problem). I'm going to change the default id to "0" (string), any chance this change can be merged in the lib?
from jsonrpc2-elixir.
Resolved, released soon
from jsonrpc2-elixir.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsonrpc2-elixir.