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

Example invocation via curl provided in overview at http://localhost:9090/wallet/v2 is incorrect. #942

Open
i-infra opened this issue Jan 4, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@i-infra
Copy link

i-infra commented Jan 4, 2024

Describe the bug
image

To Reproduce

Copy and paste the example provided. An error is returned.

name@machine > curl -s localhost:9090/wallet/v2 -d '{"method": "create_account", "params": {"name": "Alice"}}' -X POST -H 'Content-type: application/json'

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>422 Unprocessable Entity</title>
</head>
<body align="center">
    <div role="main" align="center">
        <h1>422: Unprocessable Entity</h1>
        <p>The request was well-formed but was unable to be followed due to semantic errors.</p>
        <hr />
    </div>
    <div role="contentinfo" align="center">
        <small>Rocket</small>
    </div>
</body>
</html>⏎                            

Steps to reproduce the behavior:

Expected behavior

A method is invoked instead of an error returned.

Environment (please complete the following information):

  • OS: Ubuntu
  • Version 20.04
  • FS version 2.9.1
name@machine > curl -s http://localhost:9090/wallet --data '{"method": "version", "jsonrpc": "2.0", "id": 1 }' -X POST -H 'Content-type: application/json'
{"method":"version","result":{"string":"2.9.1","number":["2","9","1",""],"commit":"VERGEN_IDEMPOTENT_OUTPUT"},"jsonrpc":"2.0","id":1}

Additional context

"jsonrpc": "2.0", "id": 1 are required components of making a json rpc request.

@i-infra i-infra added the bug Something isn't working label Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant