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

Add more examples using curl to the README #101

Open
mhfowler opened this issue Oct 7, 2024 · 1 comment
Open

Add more examples using curl to the README #101

mhfowler opened this issue Oct 7, 2024 · 1 comment

Comments

@mhfowler
Copy link
Collaborator

mhfowler commented Oct 7, 2024

based on a discussion with @moid on ssb %/q6q4t3WMS7dVVKErsjvOTInR2ZGvMZb5yAiKrl0Ecg=.sha256

it looks like maybe the one example of curl we could find in the documentation was out of sync,
and in addition to the jsonrpc examples in rust for solar_client,

it could be nice to provide examples in curl, as a reference for those interacting with solar from the command line of from another language

@mhfowler
Copy link
Collaborator Author

mhfowler commented Oct 7, 2024

e.g.

whoami:

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "whoami", "id":1 }' 127.0.0.1:3030

publish:

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "publish", "params": {"msg": {"type":  "post", "text": "this is a test post for moid"} }, "id":1 }' 127.0.0.1:3030

feed (of the ID returned by whoami in my case):

curl -X POST -H "Content-Type: application/json" -d '{"jsonrpc": "2.0", "method": "feed", "params": {"pub_key": "@3TOzePzvEXgEDf7/jKmpDjlTHRs1e98GDzfIItAQHM0=.ed25519" }, "id":1 }' 127.0.0.1:3030

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

1 participant