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

JSON-RPC batched calls not work #47

Closed
LanfordCai opened this issue Aug 9, 2018 · 2 comments
Closed

JSON-RPC batched calls not work #47

LanfordCai opened this issue Aug 9, 2018 · 2 comments

Comments

@LanfordCai
Copy link
Contributor

  curl localhost:13037 \
  -X POST \
  --data '[{
    "method": "getrawtransaction",
    "params": ["5f5f9167fb5dbef837976eb80d7c598ace3e792b976813ec22f90f71cc1cf922", true]
  }]'

response with

{
  "error": {
    "message": "Not found."
  }
}

Maybe there should be something like this in /lib/node/http.js initRouter function:

    this.use(async (req, res) => {
      if (req.method === 'POST' && req.path.length === 0) {
        if (Array.isArray(req.body)) {
          // Do something
        };
      };
    });
@boymanjor
Copy link
Contributor

@LanfordCai thanks for finding this bug! I've traced the cause to the bweb library and have opened a PR fixing the issue.

@LanfordCai
Copy link
Contributor Author

LanfordCai commented Oct 17, 2018

This bug has been fixed in bweb, so I would close this issue. @boymanjor

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

Successfully merging a pull request may close this issue.

2 participants