I am trying to pass bash variables to the cURL request body. I've tried different ways of formatting the string in order for variables to be expanded, however, the JSON is not parsed. Could anyone please help me with this?
IP = $1
TOTAL = $2
curl -s -H "Content-Type: application/json" -X POST -d '{"total" : $TOTAL, "ip" : $2}' http://localhost:3000/start