adduser.sh 273 Bytes
#!/bin/env sh

[[ $# -lt 2 ]] && exit

USER=$1
ADDRESS=$2

echo "Add user: ${USER} with address: ${ADDRESS}"

curl -i --header "Content-Type: application/json" \
  --request PUT \
  --data '{"name":"'"${USER}"'","address":"'"${ADDRESS}"'"}' \
  http://localhost:8080/users