1INCLUDE $TOP/test/config.htb
2
3# runs exactly one time
4CLIENT
5
6_REQ $YOUR_HOST $YOUR_PORT
7__GET /your/path/to/your/resource?your=params HTTP/1.1
8__Host: $YOUR_HOST
9__User-Agent: mozilla
10__
11_EXPECT . "HTTP/1.1 200 OK"
12# Pipes the receved stuff into a script :)
13_SOCKET
14_READLINE
15_READLINE
16_READLINE
17_EXPECT . "==AS1 OK=="
18_EXEC| cat > tmp.txt
19_RECV CHUNKED
20_END SOCKET
21
22_REQ $YOUR_HOST $YOUR_PORT
23__POST /your/path/to/your/resource?your=params HTTP/1.1
24__Host: $YOUR_HOST
25__User-Agent: mozilla
26__Content-Length: AUTO
27__
28_PIPE
29_EXEC cat tmp.txt
30_EXEC rm -f tmp.txt
31_EXPECT . "HTTP/1.1 200 OK"
32_WAIT
33
34END
35
36SERVER $YOUR_PORT
37
38_RES
39_WAIT
40__HTTP/1.1 200 OK
41__Transfer-Encoding: chunked
42_FLUSH
43__==AS1 OK==
44_CHUNKED
45__
46__0
47__
48
49_RES
50_EXPECT . "==AS1 OK=="
51_WAIT
52__HTTP/1.1 200 OK
53__Content-Type: text/html
54__
55
56END
57
58