Quantcast
Viewing all articles
Browse latest Browse all 4895

Beginners • Re: "Post" a json string to a port

Thanks memjr
Believe me, I have been pulling my hair out with curl and its options and syntax as a single line command. This is my best result to date:

Code:

pi@raspberrypi:~ $ curl -d  {"command": "getAllCameras"} http://192.168.0.106:1025curl: (3) unmatched close brace/bracket in URL position 14:getAllCameras}             ^
I will keep on fighting . . . . . . . . . .
Try single quoting the argument to -d:

Code:

curl -d  '{"command": "getAllCameras"}' http://192.168.0.106:1025
The command line is splitting the -d data argument into -d {"command" and "getAllCameras"}.

Statistics: Posted by rpdom — Sun Apr 21, 2024 7:57 am



Viewing all articles
Browse latest Browse all 4895

Trending Articles