Help for a newbie:
Has anyone built a program that uses Net.WebService and .Post for a json REST request?
Here is a cURL request that works: (note the escape characters for \")
curl -d "{\"tmode\":2,\"t_cool\":80}" http://<url>/tstat
Here is what I tried in HG (does not work):
string postString = "{\"tmode\":2,\"t_cool\":80}";
var resultPost = Net.WebService("<url>/tstat").Post(postString);
It does not change the thermostat and does not produce an error.
The <url> is OK because I can do a .GetData()
Thank