Curl

From ElectroDragon Wiki
Revision as of 03:36, 6 February 2020 by Chao (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

{"key1":"value1", "key2":true, "key3": 3.0, "key4": 4}