Get
curl --noproxy '*' -k -v
https://github.com/mozilla/geckodriver/releases/download/v0.14.0/geckodriver-v0.14.0-linux64.tar.gz
Post
curl --noproxy '*' -k -X POST -d
'{"data":{"username":"x1","password":"x2"}}' https://localhost/admin
Put
curl --noproxy '*' -k -s -X PUT -d '{ "data": "something" }' -H
'Content-Type: application/json' -i http://localhost/query
Put with headers
curl \
-X PUT \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
-d '{"state": "ready"}' \
'http://localhost/query' --noproxy '*'
Get JSON
Для этого используется утилита jq.
curl --noproxy '*' -k -s -X GET -i http://localhost/query | jq
File Upload
curl --noproxy '*' -k -s -i -F firmware=@/home/user/something.bin
'http://localhost/query' -v