Date created: Sunday, April 30, 2023 4:22:51 PM. Last modified: Thursday, May 11, 2023 5:41:23 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

 

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