#!/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