[Htt-users] Poll
Brought to you by:
ia97lies
|
From: Christian L. <li...@gm...> - 2012-07-18 10:54:01
|
I think about an new major release for httest with signifcant syntax
changes. But still not sure how to do this. Here is a sample it could
look like:
CLIENT
store = {}
function foo(a)
end
function bla(c)
end
foo("hallo")
bla("heho")
auto_close(true)
connect(
"https://127.0.0.1:8080",
ssl:set_cert("foo.cert.pem", "foo.key.pem", "foo.ca.pem")
)
__GET / HTTP/1.1
__Host: localhost:8080
__
expect(body, "foo")
match(header, "Set-Cookie: mycookie=([^;]+)" cookie)
wait()
bps(200, function()
__GET / HTTP/1.1
__Host: localhost:8080
__Cookie: mycookie=$cookie
__
wait()
end)
for i=1,10 do
__GET / HTTP/1.1
__Host: localhost:8080
__
expect(body, "foo");
wait()
end
END
But this looks not that readable as the old syntax. It is a mixup of lua
and httest syntax. The only command I would make with httest would be __
and _-. Then I need a compilation step to embedd this httest commands to
lua.
Any other suggestions?
Thanks
Christian
|