-
Notifications
You must be signed in to change notification settings - Fork 4
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
System Control request and response are REST-awkward #2
Comments
Thanks for your proposal. |
Great! In that case let me make a more clear suggestion:
The value sent and received could be in a common parameter (like Set volume:$ curl -X POST -H "Content-Type: application/json" -d '{"value": 0.75}' \
http://localhost:9431/system/control/volume
Get volume:$ curl -X GET http://localhost:9431/system/control/volume
{"value":0.75} Set muted state:$ curl -X POST -H "Content-Type: application/json" -d '{"value": true}' \
http://localhost:9431/system/control/mute
Get muted state:$ curl -X GET http://localhost:9431/system/control/mute
{"value":true} |
Thanks for your great suggestion! I'll implement it in a few days. |
No problem, I'm glad to help out. By the way is |
Thanks your help! |
No that makes perfect sense, so if we run into issues with |
yes, the Matchstick should integrate these useful patches. |
A couple of things stick out:
POST
is used for a value fetch and for a value changeVOLUME
andMUTED
are wrapped by a single edge, so when requesting the volume, we also get the muted statelevel
property provides the value for aGET_VOLUME
requestThe text was updated successfully, but these errors were encountered: