In linux I can say
- Code: Select all
curl --digest -u admin:{my_password} -X PUT -H "X-CSRF: x" --data "value=false" "http://10.0.2.14/restapi/relay/outlets/3/state/"
.. and the server at 10.0.2.14 comes back fine. However, when I do this from the Mac (10.0.2.12) that Indigo runs on (MacOX 12.0.1), the server at 10.0.2.14 times out with an internal error - it's not a TCP type error. I suspect it's something funky on the Mac, so I thought I would try and write a python script to simulate the cURL call.
Anyone have some pointers in how I would write the Python code? I know how to pass in data, but I don't know about the credentials digest, etc, and I want to do it the "indigo way".
Thanks,