CURL – Send (POST/PUT) Payload Data using File

Syntax :

response=$(curl -X PUT URL -d @/FILE_PATH/FILE_NAME)
echo $response

Example :

response=$(curl -X PUT http://test_url.com/test -d @/usr/local/input.json)
echo $response

Leave a Reply