resourcepool / jarpic-client

A Simple JSON-RPC 2.0 Java Client using Jackson2 and OkHttp
Apache License 2.0
6 stars 2 forks source link

.method() #1

Open gsus24 opened 3 years ago

gsus24 commented 3 years ago

Hello get an empty string error. Find out that it comes from empty or missing .method("cmd::execCmd")

This is how it should work on command line curl -XPOST -d '{"command":"color","color":[0,0,255],"priority":50,"origin":"My Fancy App"}' 'http://192.168.1.110:8090/json-rpc'

What is need for the .method("cmd::execCmd") section?

Thanks

loicortola commented 3 years ago

Hello, What you seem to use doesn't really look like a JSON-RPC command... A JSON-RPC command looks like this: https://www.jsonrpc.org/specification Your requests seems like a simple REST/JSON POST command, with a JSON payload :)

gsus24 commented 3 years ago

Hi this is what i expect to do https://docs.hyperion-project.org/en/json/Control.html#set-color The command above is maybe for the old server. Please correct me if i am wrong, like i understood its a JSON RPC server https://docs.hyperion-project.org/en/json/#server-info

Hope you know better. Thanks ;)