1
0
justguestbook/test/curl_new.sh

20 lines
307 B
Bash
Executable File

#!/usr/bin/sh
addr="http://127.0.0.1:18888"
pass="1234"
case $1 in
get)
curl $addr/
break
;;
new)
curl -d "name=$2&message=$3" $addr/
break
;;
reply)
curl -H "X-Password: $pass" -d "reply=$3" $addr/$2/reply
break
;;
esac