updateuser.sh
294 Bytes
#!/bin/env sh
[[ $# -lt 3 ]] && exit
ID=$1
USER=$2
ADDRESS=$3
echo "Update user ${ID}: ${USER} with address: ${ADDRESS}"
curl -i --header "Content-Type: application/json" \
--request PUT \
--data '{"name":"'"${USER}"'","address":"'"${ADDRESS}"'"}' \
http://localhost:8080/users/${ID}