-# Quis custodiet ipsos custodes?
-#
# $Id$
+test "basic default HTTP transactions with expect"
+
server s1 -listen :9080 {
rxreq
expect req.request == GET
expect req.proto == HTTP/1.1
expect req.url == "/"
- txresp -body "0123456789"
+ txresp
}
server s1 -start
--- /dev/null
+# $Id$
+
+test "basic default HTTP transactions with expect and options"
+
+server s1 -listen :9080 {
+ rxreq
+ expect req.request == PUT
+ expect req.proto == HTTP/1.0
+ expect req.url == "/foo"
+ txresp -proto HTTP/1.2 -status 201 -msg Foo
+}
+
+server s1 -start
+
+client c1 -connect localhost:9080 {
+ txreq -req PUT -proto HTTP/1.0 -url /foo
+ rxresp
+ expect resp.proto == HTTP/1.2
+ expect resp.status == 201
+ expect resp.msg == Foo
+}
+
+client c1 -run
+
+server s1 -wait