Curl
Quotation mark in different OS
Original Linux command:
curl -X POST -H Content-Type:application/json -d '{"freq":100,"rgb":{"red":200,"green":0,"blue":0}}' http://ip/config?command=light
In windows, curl commands should be changed:
curl -X POST -H Content-Type:application/json -d "{\"freq\":100,\"rgb\":{\"red\":200,\"green\":0,\"blue\":0}}" http://ip/config?command=light
Curl
- Send HTTP data -> curl -v -X POST -d @telemetry-data-as-object.json http://localhost:8080/api/v1/$ACCESS_TOKEN/telemetry --header "Content-Type:application/json"
- telemetry-data-as-object.json
{"key1":"value1", "key2":true, "key3": 3.0, "key4": 4}