Date created: Sunday, April 30, 2023 4:22:51 PM. Last modified: Sunday, October 27, 2024 4:48:12 PM
'curl' - Notes
Basic token auth:
curl -H "Authorization: Token XXXXXXX" -H "Accept: application/json; indent=4" -k https://myapp.net/api/get/object/1
HTTP Status code:
root@84547d3c697e:/# curl -I https://null.53bits.co.uk/
HTTP/2 200
Replay JSON data:
curl -4s \
-H "Accept: application/json" \
https://rest.db.ripe.net/ripe/person/JBIL-RIPE | jq > test_data.json
sed -i 's/JBIL/JBIL2/g' test_data.json
curl -4sX POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data @test_data.json \
https://rest.db.ripe.net/ripe/person/?password=mainterin-password-here\&dry-run
Previous page: CIFS/SMB Notes
Next page: 'dd' - Notes