#!/usr/bin/expect -f
# ---------------------------------------------------------------------------- #
## \file test2.exp
## \author Sebastien Beaugrand
## \sa http://beaugrand.chez.com/
## \copyright CeCILL 2.1 Free Software license
# ---------------------------------------------------------------------------- #
set ip [lindex $argv 0]
set url http://$ip:8383

spawn curl -d \{"jsonrpc":"2.0","method":"status","id":1\} $url
expect \{"id":1,"jsonrpc":"2.0","result":"ok"\}
expect eof

spawn curl -d \{"jsonrpc":"2.0","method":"quit"\} $url
expect eof