cURL
Nous ne recommandons pas d’utiliser l’intégration cURL en production, mais elle peut être pratique pour un test rapide lorsque vous n’avez pas de SDK sous la main.
Installer
brew install curl jq || sudo apt install curl jq
Exemple
# Prerequisites: brew install curl jq || sudo apt install curl jq
# To avoid tampering, use Signature Authentication
echo '{
"template_id": "YOUR_TEMPLATE_ID",
"auth": {
"key": "YOUR_TRANSLOADIT_KEY"
},
"steps": {}
}' | curl \
--request POST \
--form 'params=<-' \
--form myfile1=@./joe-gardner-149699.jpg \
https://api2.transloadit.com/assemblies | jq