step3 script

This commit is contained in:
folex
2019-08-16 18:51:54 +03:00
parent 4e236e0ee8
commit 48aebaba15
4 changed files with 77 additions and 4 deletions

View File

@ -20,15 +20,14 @@ echo
# Wait for app to be initialized
sleep 1 && (docker logs -f frun 2>&1 &) | grep -q initialized && sleep 1
# Send our username to the application
echo -e "Sending request..."
# Assign json to a variable using heredoc technique
JSON=$(cat <<JSON
{"action":"Post","message":"I'm nice, you're nice, it's nice!","username":"random_joe"}
JSON
)
echo -e "Sending request... $JSON"
# Send json as a request, and receive result
RESPONSE=$(curl -s 'http://localhost:30000/apps/1/tx' --data $'sessionId/0\n'"$JSON" --compressed | jq -r .result.data | base64 -D)