Coder Social home page Coder Social logo

Comments (5)

ericentin avatar ericentin commented on August 17, 2024

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.

nkmanolovsumup avatar nkmanolovsumup commented on August 17, 2024

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.

ericentin avatar ericentin commented on August 17, 2024

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.

whitered avatar whitered commented on August 17, 2024

+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.

ericentin avatar ericentin commented on August 17, 2024

Resolved, released soon

from jsonrpc2-elixir.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.