Very new RPi user here – one week’s experience. I have 3 related questions:
1.Should I use pycurl or curl?
2.What would be the right syntax for the pycurl/curl command?
3.Is curl even the best way to run a json command?
I have successfully run a curl command on a Windows PC. For that I used:
The command comes from an app’s list of json commands https://www.toolsforgopro.com/cameratools_server, and the one that I want to run is:
I developed the single line curl command after using RESTer to run the above json, and RESTer then telling me it used:
plus a lot of time spent with escapes, etc, but I have a command that works on a Windows server (the one right at the top)
Now I need it to work on a RPi3 Buster which is happy with the curl command, just not with my syntax. So, back to the 3 questions:
1.Should I use pycurl or curl?
2.What would be the right syntax for the pycurl/curl command?
3.Is curl even the best way to run a json command?
Thank you
1.Should I use pycurl or curl?
2.What would be the right syntax for the pycurl/curl command?
3.Is curl even the best way to run a json command?
I have successfully run a curl command on a Windows PC. For that I used:
Code:
curl.exe -d "{\"command\": \"sendCameraCommand\",\"cameras\": [\"GoPro 9464\"],\"cameraCommand\": \"startRecording\"}" http://192.168.0.108:809
Code:
{"command": "sendCameraCommand","cameras": ["GoPro 9464"],"cameraCommand": "startRecording"}
Code:
curl -X POST http://192.168.0.108:809 \ -d '{"command": "sendCameraCommand","cameras": ["GoPro 9464"],"cameraCommand": "startRecording"}'
Now I need it to work on a RPi3 Buster which is happy with the curl command, just not with my syntax. So, back to the 3 questions:
1.Should I use pycurl or curl?
2.What would be the right syntax for the pycurl/curl command?
3.Is curl even the best way to run a json command?
Thank you
Statistics: Posted by Gerald_D — Fri Apr 12, 2024 9:56 am